From 63576c23e41092ae16c57e15977bf10e72327799 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Thu, 5 Nov 2015 15:30:32 +0100 Subject: remove excess string allocation &format!("...") is the same as "" if we're not doing any interpolation, and doesn't allocate an intermediate String. --- src/libsyntax/parse/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/parse') 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")); } } } -- cgit 1.4.1-3-g733a5