diff options
| author | Peter Atashian <retep998@gmail.com> | 2014-09-13 01:13:38 -0400 |
|---|---|---|
| committer | Peter Atashian <retep998@gmail.com> | 2014-09-13 01:13:59 -0400 |
| commit | bcad3a581663e84694e99300349341822b8e8f6e (patch) | |
| tree | a59a04d785c6cfdeb361c79e6758c279e9fcea9d /src/libsyntax/util | |
| parent | 8780d9c6b5abce83089ca1dafb7efd178569a052 (diff) | |
| download | rust-bcad3a581663e84694e99300349341822b8e8f6e.tar.gz rust-bcad3a581663e84694e99300349341822b8e8f6e.zip | |
Improve memory usage of libsyntax
Replaces some usage of `.to_string()` with `.into_string()` Signed-off-by: Peter Atashian <retep998@gmail.com>
Diffstat (limited to 'src/libsyntax/util')
| -rw-r--r-- | src/libsyntax/util/interner.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs index 452b5a52512..a919b3ce903 100644 --- a/src/libsyntax/util/interner.rs +++ b/src/libsyntax/util/interner.rs @@ -121,7 +121,7 @@ impl fmt::Show for RcStr { impl RcStr { pub fn new(string: &str) -> RcStr { RcStr { - string: Rc::new(string.to_string()), + string: Rc::new(string.into_string()), } } } |
