diff options
| author | ljedrz <ljedrz@gmail.com> | 2018-07-27 11:11:18 +0200 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2018-07-27 11:11:18 +0200 |
| commit | 57a5a9b05423c4f832cd9a3aaa7e06d55fab6efa (patch) | |
| tree | e376fc76ea7242b63d95e6c68e7955c627b785bf /src/libsyntax_ext | |
| parent | 3d0e93309d61636585cfe5ac75c0db8cb5ba03e1 (diff) | |
| download | rust-57a5a9b05423c4f832cd9a3aaa7e06d55fab6efa.tar.gz rust-57a5a9b05423c4f832cd9a3aaa7e06d55fab6efa.zip | |
Prefer to_string() to format!()
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/concat.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax_ext/concat.rs b/src/libsyntax_ext/concat.rs index 99dba8af754..dcdd2c590e0 100644 --- a/src/libsyntax_ext/concat.rs +++ b/src/libsyntax_ext/concat.rs @@ -42,10 +42,10 @@ pub fn expand_syntax_ext( ast::LitKind::Int(i, ast::LitIntType::Unsigned(_)) | ast::LitKind::Int(i, ast::LitIntType::Signed(_)) | ast::LitKind::Int(i, ast::LitIntType::Unsuffixed) => { - accumulator.push_str(&format!("{}", i)); + accumulator.push_str(&i.to_string()); } ast::LitKind::Bool(b) => { - accumulator.push_str(&format!("{}", b)); + accumulator.push_str(&b.to_string()); } ast::LitKind::Byte(..) | ast::LitKind::ByteStr(..) => { cx.span_err(e.span, "cannot concatenate a byte string literal"); |
