Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion noir_stdlib/src/array.nr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::cmp::{Ord};
use crate::cmp::Ord;

// TODO: Once we fully move to the new SSA pass this module can be removed and replaced
// by the methods in the `slice` module
Expand Down
6 changes: 5 additions & 1 deletion tooling/nargo_fmt/src/rewrite/imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ impl UseTree {

let mut iter = self.path.iter().peekable();
while let Some(segment) = iter.next() {
let segment_str = segment.rewrite(visitor, shape);
let mut segment_str = segment.rewrite(visitor, shape);
if segment_str.contains('{') && !segment_str.contains(',') {
let empty = "";
segment_str = segment_str.replace(['{', '}'], empty);
}
result.push_str(&segment_str);

if iter.peek().is_some() {
Expand Down
1 change: 1 addition & 0 deletions tooling/nargo_fmt/tests/expected/import_braces.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use dep::std::hash::sha256;
1 change: 1 addition & 0 deletions tooling/nargo_fmt/tests/input/import_braces.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use dep::std::hash::{sha256};