mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
Merge pull request #897 from matklad/refactor-run
Refactor run family of functions
This commit is contained in:
+3
-3
@@ -17,7 +17,7 @@
|
||||
extern crate env_logger;
|
||||
extern crate getopts;
|
||||
|
||||
use rustfmt::{run, run_from_stdin};
|
||||
use rustfmt::{run, Input};
|
||||
use rustfmt::config::{Config, WriteMode};
|
||||
|
||||
use std::env;
|
||||
@@ -197,7 +197,7 @@ fn execute() -> i32 {
|
||||
// write_mode is always Plain for Stdin.
|
||||
config.write_mode = WriteMode::Plain;
|
||||
|
||||
run_from_stdin(input, &config);
|
||||
run(Input::Text(input), &config);
|
||||
0
|
||||
}
|
||||
Operation::Format { files, config_path } => {
|
||||
@@ -233,7 +233,7 @@ fn execute() -> i32 {
|
||||
print_usage(&opts, &e);
|
||||
return 1;
|
||||
}
|
||||
run(&file, &config);
|
||||
run(Input::File(file), &config);
|
||||
}
|
||||
0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user