We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce8e645 commit 47cf912Copy full SHA for 47cf912
src/expr.rs
@@ -10,7 +10,6 @@
10
11
use std::cmp::min;
12
use std::borrow::Cow;
13
-use std::fmt::Write;
14
use std::iter::{repeat, ExactSizeIterator};
15
16
use syntax::{ast, ptr};
@@ -1351,14 +1350,14 @@ impl<'a> Rewrite for ControlFlow<'a> {
1351
1350
ControlBraceStyle::AlwaysNextLine if last_in_chain => &*alt_block_sep,
1352
_ => " ",
1353
};
1354
- write!(
1355
- &mut result,
+
+ result.push_str(&format!(
1356
"{}else{}",
1357
between_kwd_else_block_comment
1358
.as_ref()
1359
.map_or(between_sep, |s| &**s),
1360
- after_else_comment.as_ref().map_or(after_sep, |s| &**s)
1361
- ).ok()?;
+ after_else_comment.as_ref().map_or(after_sep, |s| &**s),
+ ));
1362
result.push_str(&rewrite?);
1363
}
1364
0 commit comments