diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-04-01 14:13:53 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-04-01 14:49:15 +0000 |
| commit | 625b8000f7897ab51312f1800fcae280cc3ac81b (patch) | |
| tree | 99560fc62187fcc91fcfb53395e571f76b415693 | |
| parent | 15dbafa81ee8dcf70ead827bb4991d5be8cd99de (diff) | |
| download | rust-625b8000f7897ab51312f1800fcae280cc3ac81b.tar.gz rust-625b8000f7897ab51312f1800fcae280cc3ac81b.zip | |
Allow formatting example/gen_block_iterate.rs
| -rw-r--r-- | example/gen_block_iterate.rs | 16 | ||||
| -rw-r--r-- | rustfmt.toml | 4 |
2 files changed, 12 insertions, 8 deletions
diff --git a/example/gen_block_iterate.rs b/example/gen_block_iterate.rs index 25bfe542d22..de9a3d550ec 100644 --- a/example/gen_block_iterate.rs +++ b/example/gen_block_iterate.rs @@ -6,16 +6,25 @@ #![feature(gen_blocks)] fn foo() -> impl Iterator<Item = u32> { - gen { yield 42; for x in 3..6 { yield x } } + gen { + yield 42; + for x in 3..6 { + yield x + } + } } fn moved() -> impl Iterator<Item = u32> { let mut x = "foo".to_string(); gen move { yield 42; - if x == "foo" { return } + if x == "foo" { + return; + } x.clear(); - for x in 3..6 { yield x } + for x in 3..6 { + yield x + } } } @@ -32,5 +41,4 @@ fn main() { let mut iter = moved(); assert_eq!(iter.next(), Some(42)); assert_eq!(iter.next(), None); - } diff --git a/rustfmt.toml b/rustfmt.toml index f31fa9c76ab..35c92663eb9 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,7 +1,3 @@ -ignore = [ - "example/gen_block_iterate.rs", # uses edition 2024 -] - # Matches rustfmt.toml of rustc style_edition = "2024" use_small_heuristics = "Max" |
