about summary refs log tree commit diff
path: root/src/libsyntax/parse/mod.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2013-12-23 17:45:01 +0100
committerSimon Sapin <simon.sapin@exyr.org>2014-01-21 15:48:48 -0800
commit05ae134acebee3f35af4880de113a7ae7ce20002 (patch)
tree096daf1c7c42bd04ac3d1f11f710fd9786d9937a /src/libsyntax/parse/mod.rs
parentb8c41492939c77b7139e46ee67375b47041f6692 (diff)
downloadrust-05ae134acebee3f35af4880de113a7ae7ce20002.tar.gz
rust-05ae134acebee3f35af4880de113a7ae7ce20002.zip
[std::str] Rename from_utf8_owned_opt() to from_utf8_owned(), drop the old from_utf8_owned() behavior
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
-rw-r--r--src/libsyntax/parse/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index b1a80878cf1..9713f331147 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -246,7 +246,7 @@ pub fn file_to_filemap(sess: @ParseSess, path: &Path, spanopt: Option<Span>)
             unreachable!()
         }
     };
-    match str::from_utf8_owned_opt(bytes) {
+    match str::from_utf8_owned(bytes) {
         Some(s) => {
             return string_to_filemap(sess, s.to_managed(),
                                      path.as_str().unwrap().to_managed());
@@ -315,7 +315,7 @@ mod test {
         let mut writer = MemWriter::new();
         let mut encoder = extra::json::Encoder::new(&mut writer as &mut io::Writer);
         val.encode(&mut encoder);
-        str::from_utf8_owned(writer.unwrap())
+        str::from_utf8_owned(writer.unwrap()).unwrap()
     }
 
     // produce a codemap::span