From da03c9df33177d77029c52f8a68a5d214a6e83c7 Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Fri, 1 May 2015 17:08:39 +0200 Subject: syntax: Avoid reallocating or copying in CodeMap::new_filemap Avoid creating a new String when there is no BOM to strip, and otherwises use .drain(..3) to strip the BOM using the same allocation. --- src/libsyntax/lib.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libsyntax/lib.rs') diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 275400009f5..330fe86deeb 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -27,6 +27,7 @@ #![feature(associated_consts)] #![feature(collections)] +#![feature(collections_drain)] #![feature(core)] #![feature(libc)] #![feature(rustc_private)] -- cgit 1.4.1-3-g733a5