]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/crateid.rs
libsyntax: Mechanically change `~[T]` to `Vec<T>`
[rust.git] / src / libsyntax / crateid.rs
index b5f02fb7e644106b0e37ab7cb37fd307988575fd..f3dcd61f2405795c4f48c16f5c4bce66ae32f6c8 100644 (file)
@@ -48,7 +48,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 
 impl FromStr for CrateId {
     fn from_str(s: &str) -> Option<CrateId> {
-        let pieces: ~[&str] = s.splitn('#', 1).collect();
+        let pieces: Vec<&str> = s.splitn('#', 1).collect();
         let path = pieces[0].to_owned();
 
         if path.starts_with("/") || path.ends_with("/") ||
@@ -56,13 +56,13 @@ fn from_str(s: &str) -> Option<CrateId> {
             return None;
         }
 
-        let path_pieces: ~[&str] = path.rsplitn('/', 1).collect();
+        let path_pieces: Vec<&str> = path.rsplitn('/', 1).collect();
         let inferred_name = path_pieces[0];
 
         let (name, version) = if pieces.len() == 1 {
             (inferred_name.to_owned(), None)
         } else {
-            let hash_pieces: ~[&str] = pieces[1].splitn(':', 1).collect();
+            let hash_pieces: Vec<&str> = pieces[1].splitn(':', 1).collect();
             let (hash_name, hash_version) = if hash_pieces.len() == 1 {
                 ("", hash_pieces[0])
             } else {