remove excess string allocation

&format!("...") is the same as "" if we're not doing any interpolation,
and doesn't allocate an intermediate String.
This commit is contained in:
Steve Klabnik 2015-11-05 15:30:32 +01:00
parent a216e84727
commit 63576c23e4
15 changed files with 26 additions and 35 deletions

View file

@ -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"));
}
}
}