Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nargo fmt should remove curly brace imports which only contain a single item #4480

Closed
TomAFrench opened this issue Mar 4, 2024 · 0 comments · Fixed by #4529
Closed

Nargo fmt should remove curly brace imports which only contain a single item #4480

TomAFrench opened this issue Mar 4, 2024 · 0 comments · Fixed by #4529
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@TomAFrench
Copy link
Member

The formatter should take imports of the form

use dep::aztec::context::{Context};

and format it as

use dep::aztec::context::Context;

whereas currently we are preserving the curly braces.

@TomAFrench TomAFrench added enhancement New feature or request good first issue Good for newcomers labels Mar 4, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Mar 4, 2024
@michaeljklein michaeljklein self-assigned this Mar 5, 2024
github-merge-queue bot pushed a commit that referenced this issue Mar 14, 2024
# Description

## Problem\*

Resolves
https://github.com/noir-lang/noir/compare/master...Andy53:noir:fmt_remvoes_curly_braces_when_there_is_a_single_import?expand=1

Closes #4480 

## Summary\*
Removes curly braces from imports when there is only a single import.

`use dep::std::hash::{sha256};`
 
becomes:
`use dep::std::hash::sha256;


## Additional Context



## Documentation\*

Check one:
- [ X] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [ X] I have tested the changes locally.
- [ ] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.

---------

Co-authored-by: jfecher <[email protected]>
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants