]> git.lizzy.rs Git - rust.git/commitdiff
Update from Path to PathBuf
authorDan Glastonbury <dglastonbury@mozilla.com>
Mon, 9 Mar 2015 06:17:14 +0000 (16:17 +1000)
committerDan Glastonbury <dglastonbury@mozilla.com>
Mon, 9 Mar 2015 06:17:14 +0000 (16:17 +1000)
src/mod.rs

index 16e9c84ab84711441f96e11a9f7cb0815a058676..d4320fb7b18875ddeadef55106c99a01dc502d8e 100644 (file)
@@ -15,8 +15,8 @@
 #![feature(os)]
 #![feature(core)]
 #![feature(unicode)]
-#![feature(old_path)]
 #![feature(exit_status)]
+#![feature(path)]
 
 // TODO we're going to allocate a whole bunch of temp Strings, is it worth
 // keeping some scratch mem for this and running our own StrPool?
@@ -40,6 +40,7 @@
 use syntax::print::pprust;
 use syntax::visit;
 
+use std::path::PathBuf;
 use std::slice::SliceConcatExt;
 
 use changes::ChangeSet;
@@ -542,7 +543,7 @@ fn next_char(s: &str, mut i: usize) -> usize {
 }
 
 struct RustFmtCalls {
-    input_path: Option<Path>,
+    input_path: Option<PathBuf>,
 }
 
 impl<'a> CompilerCalls<'a> for RustFmtCalls {
@@ -553,7 +554,7 @@ fn early_callback(&mut self,
         Compilation::Continue
     }
 
-    fn some_input(&mut self, input: Input, input_path: Option<Path>) -> (Input, Option<Path>) {
+    fn some_input(&mut self, input: Input, input_path: Option<PathBuf>) -> (Input, Option<PathBuf>) {
         match input_path {
             Some(ref ip) => self.input_path = Some(ip.clone()),
             _ => {
@@ -567,10 +568,10 @@ fn some_input(&mut self, input: Input, input_path: Option<Path>) -> (Input, Opti
     fn no_input(&mut self,
                 _: &getopts::Matches,
                 _: &config::Options,
-                _: &Option<Path>,
-                _: &Option<Path>,
+                _: &Option<PathBuf>,
+                _: &Option<PathBuf>,
                 _: &diagnostics::registry::Registry)
-                -> Option<(Input, Option<Path>)> {
+                -> Option<(Input, Option<PathBuf>)> {
         panic!("No input supplied to RustFmt");
     }
 
@@ -578,8 +579,8 @@ fn late_callback(&mut self,
                      _: &getopts::Matches,
                      _: &Session,
                      _: &Input,
-                     _: &Option<Path>,
-                     _: &Option<Path>)
+                     _: &Option<PathBuf>,
+                     _: &Option<PathBuf>)
                      -> Compilation {
         Compilation::Continue
     }