about summary refs log tree commit diff
path: root/src/libworkcache
diff options
context:
space:
mode:
Diffstat (limited to 'src/libworkcache')
-rw-r--r--src/libworkcache/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libworkcache/lib.rs b/src/libworkcache/lib.rs
index 6c1a52f4eee..8883abffb93 100644
--- a/src/libworkcache/lib.rs
+++ b/src/libworkcache/lib.rs
@@ -479,7 +479,7 @@ impl<'a, T:Send +
 fn test() {
     use std::os;
     use std::io::{fs, Process};
-    use std::str::from_utf8_owned;
+    use std::str::from_utf8;
 
     // Create a path to a new file 'filename' in the directory in which
     // this test is running.
@@ -505,7 +505,7 @@ fn test() {
         let pth = pth.clone();
 
         let contents = File::open(&pth).read_to_end().unwrap();
-        let file_content = from_utf8_owned(contents).unwrap();
+        let file_content = from_utf8(contents.as_slice()).unwrap().to_owned();
 
         // FIXME (#9639): This needs to handle non-utf8 paths
         prep.declare_input("file", pth.as_str().unwrap(), file_content);