diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-11-05 15:30:32 +0100 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-11-05 15:30:34 +0100 |
| commit | 63576c23e41092ae16c57e15977bf10e72327799 (patch) | |
| tree | 2fb9960c65b2d703592121d069b8bb3fcc2fbb9a /src/libsyntax/parse | |
| parent | a216e847272ddbd3033037b606eaf2d801c250b9 (diff) | |
| download | rust-63576c23e41092ae16c57e15977bf10e72327799.tar.gz rust-63576c23e41092ae16c57e15977bf10e72327799.zip | |
remove excess string allocation
&format!("...") is the same as "" if we're not doing any interpolation,
and doesn't allocate an intermediate String.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 2401f6be78f..7da03c7482c 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1843,7 +1843,7 @@ impl<'a> Parser<'a> { }); } _ => { - return Err(self.fatal(&format!("expected a lifetime name"))); + return Err(self.fatal("expected a lifetime name")); } } } |
