about summary refs log tree commit diff
path: root/src/bin
diff options
context:
space:
mode:
authorNick Cameron <nrc@ncameron.org>2016-04-05 11:25:13 +1200
committerNick Cameron <nrc@ncameron.org>2016-04-05 11:25:13 +1200
commit4fdf859787fffe7d50e2a9dbc5e71d1087ad41ea (patch)
tree356514b6f299452949fb0d43c3b469ce8401c78e /src/bin
parent6e393b3d53aba6f3d18b76fd820c148f9e4b62e7 (diff)
parentc29ee66b94fea672f459374942a4e311dc9cef5e (diff)
Merge pull request #897 from matklad/refactor-run
Refactor run family of functions
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/rustfmt.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/rustfmt.rs b/src/bin/rustfmt.rs
index 666185f837e..bce8ac7bc0f 100644
--- a/src/bin/rustfmt.rs
+++ b/src/bin/rustfmt.rs
@@ -17,7 +17,7 @@ extern crate toml;
 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
         }