summary refs log tree commit diff
path: root/src/libsyntax/parse/token.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-05-19 01:07:44 -0400
committerAlex Crichton <alex@alexcrichton.com>2013-05-20 16:10:40 -0500
commit82fa0018c80c8f64cb1b446a7e59492d9ad97b1d (patch)
treedf9f62eca9ddf44392626a5f22ced00652c08004 /src/libsyntax/parse/token.rs
parent074799b4c586c521ba678a4dc3809cad1a872dfe (diff)
downloadrust-82fa0018c80c8f64cb1b446a7e59492d9ad97b1d.tar.gz
rust-82fa0018c80c8f64cb1b446a7e59492d9ad97b1d.zip
Remove all unnecessary allocations (as flagged by lint)
Diffstat (limited to 'src/libsyntax/parse/token.rs')
-rw-r--r--src/libsyntax/parse/token.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index b4bad5abbf9..055336a6d95 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -173,14 +173,14 @@ pub fn to_str(in: @ident_interner, t: &Token) -> ~str {
       LIT_INT_UNSUFFIXED(i) => { i.to_str() }
       LIT_FLOAT(s, t) => {
         let mut body = copy *in.get(s);
-        if body.ends_with(~".") {
+        if body.ends_with(".") {
             body = body + ~"0";  // `10.f` is not a float literal
         }
         body + ast_util::float_ty_to_str(t)
       }
       LIT_FLOAT_UNSUFFIXED(s) => {
         let mut body = copy *in.get(s);
-        if body.ends_with(~".") {
+        if body.ends_with(".") {
             body = body + ~"0";  // `10.f` is not a float literal
         }
         body