Skip to content

Commit

Permalink
Update from Path to PathBuf
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Glastonbury committed Mar 9, 2015
1 parent 3f58f82 commit 33e12c5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/mod.rs
Expand Up @@ -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?
Expand All @@ -40,6 +40,7 @@ use syntax::parse::token;
use syntax::print::pprust;
use syntax::visit;

use std::path::PathBuf;
use std::slice::SliceConcatExt;

use changes::ChangeSet;
Expand Down Expand Up @@ -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 {
Expand All @@ -553,7 +554,7 @@ impl<'a> CompilerCalls<'a> for RustFmtCalls {
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()),
_ => {
Expand All @@ -567,19 +568,19 @@ impl<'a> CompilerCalls<'a> for RustFmtCalls {
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");
}

fn late_callback(&mut self,
_: &getopts::Matches,
_: &Session,
_: &Input,
_: &Option<Path>,
_: &Option<Path>)
_: &Option<PathBuf>,
_: &Option<PathBuf>)
-> Compilation {
Compilation::Continue
}
Expand Down

0 comments on commit 33e12c5

Please sign in to comment.