about summary refs log tree commit diff
path: root/src/librustc/metadata/creader.rs
diff options
context:
space:
mode:
authorKevin Ballard <kevin@sb.org>2013-10-05 19:49:32 -0700
committerKevin Ballard <kevin@sb.org>2013-10-15 22:18:30 -0700
commitd6d9b926836b1f1c2b8b3fe4ab35dc63bec7ffcd (patch)
treee197783b86700e71d94c9bc6d0254eb25b16cc0c /src/librustc/metadata/creader.rs
parented539e14712539473c3e89604cb69e2307110772 (diff)
downloadrust-d6d9b926836b1f1c2b8b3fe4ab35dc63bec7ffcd.tar.gz
rust-d6d9b926836b1f1c2b8b3fe4ab35dc63bec7ffcd.zip
path2: Adjust the API to remove all the _str mutation methods
Add a new trait BytesContainer that is implemented for both byte vectors
and strings.

Convert Path::from_vec and ::from_str to one function, Path::new().

Remove all the _str-suffixed mutation methods (push, join, with_*,
set_*) and modify the non-suffixed versions to use BytesContainer.
Diffstat (limited to 'src/librustc/metadata/creader.rs')
-rw-r--r--src/librustc/metadata/creader.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/metadata/creader.rs b/src/librustc/metadata/creader.rs
index 8ece290293b..9700f68383a 100644
--- a/src/librustc/metadata/creader.rs
+++ b/src/librustc/metadata/creader.rs
@@ -143,7 +143,7 @@ fn visit_view_item(e: @mut Env, i: &ast::view_item) {
           let meta_items = match path_opt {
               None => meta_items.clone(),
               Some((p, _path_str_style)) => {
-                  let p_path = Path::from_str(p);
+                  let p_path = Path::new(p);
                   match p_path.filestem_str() {
                       None|Some("") =>
                           e.diag.span_bug(i.span, "Bad package path in `extern mod` item"),
@@ -275,7 +275,7 @@ fn resolve_crate(e: @mut Env,
         };
         let (lident, ldata) = loader::load_library_crate(&load_ctxt);
 
-        let cfilename = Path::from_str(lident);
+        let cfilename = Path::new(lident);
         let cdata = ldata;
 
         let attrs = decoder::get_crate_attributes(cdata);