Rustup
This commit is contained in:
parent
b74cdb7b53
commit
5924b83829
3 changed files with 36 additions and 35 deletions
45
Cargo.lock
generated
45
Cargo.lock
generated
|
@ -2,46 +2,69 @@
|
||||||
name = "rustfmt"
|
name = "rustfmt"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"diff 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"diff 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"strings 0.0.1 (git+https://github.com/nrc/strings.rs.git)",
|
"strings 0.0.1 (git+https://github.com/nrc/strings.rs.git)",
|
||||||
"toml 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
"toml 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "aho-corasick"
|
||||||
|
version = "0.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"memchr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "diff"
|
name = "diff"
|
||||||
version = "0.1.0"
|
version = "0.1.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "libc"
|
||||||
version = "0.1.33"
|
version = "0.1.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "memchr"
|
||||||
|
version = "0.1.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"regex-syntax 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex"
|
||||||
|
version = "0.1.38"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"aho-corasick 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"memchr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"regex-syntax 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex-syntax"
|
name = "regex-syntax"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustc-serialize"
|
name = "rustc-serialize"
|
||||||
version = "0.3.14"
|
version = "0.3.15"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "strings"
|
name = "strings"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
source = "git+https://github.com/nrc/strings.rs.git#551331d01911b7e8da056a4a019eb367cfaf03bd"
|
source = "git+https://github.com/nrc/strings.rs.git#b7f37c4545b7dba24fb28161cd9c405fae978be4"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml"
|
name = "toml"
|
||||||
version = "0.1.20"
|
version = "0.1.20"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![cfg(not(test))]
|
#![cfg(not(test))]
|
||||||
#![feature(exit_status)]
|
|
||||||
|
|
||||||
extern crate rustfmt;
|
extern crate rustfmt;
|
||||||
|
|
||||||
|
@ -24,28 +23,7 @@ fn main() {
|
||||||
let mut def_config = String::new();
|
let mut def_config = String::new();
|
||||||
def_config_file.read_to_string(&mut def_config).unwrap();
|
def_config_file.read_to_string(&mut def_config).unwrap();
|
||||||
|
|
||||||
//run(args, WriteMode::Display, &def_config);
|
|
||||||
run(args, WriteMode::Overwrite, &def_config);
|
run(args, WriteMode::Overwrite, &def_config);
|
||||||
|
|
||||||
std::env::set_exit_status(0);
|
std::process::exit(0);
|
||||||
|
|
||||||
// TODO unit tests
|
|
||||||
// let fmt = ListFormatting {
|
|
||||||
// tactic: ListTactic::Horizontal,
|
|
||||||
// separator: ",",
|
|
||||||
// trailing_separator: SeparatorTactic::Vertical,
|
|
||||||
// indent: 2,
|
|
||||||
// h_width: 80,
|
|
||||||
// v_width: 100,
|
|
||||||
// };
|
|
||||||
// let inputs = vec![(format!("foo"), String::new()),
|
|
||||||
// (format!("foo"), String::new()),
|
|
||||||
// (format!("foo"), String::new()),
|
|
||||||
// (format!("foo"), String::new()),
|
|
||||||
// (format!("foo"), String::new()),
|
|
||||||
// (format!("foo"), String::new()),
|
|
||||||
// (format!("foo"), String::new()),
|
|
||||||
// (format!("foo"), String::new())];
|
|
||||||
// let s = write_list(&inputs, &fmt);
|
|
||||||
// println!(" {}", s);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
#![feature(collections)]
|
#![feature(str_escape)]
|
||||||
#![feature(str_char)]
|
#![feature(str_char)]
|
||||||
|
|
||||||
// TODO we're going to allocate a whole bunch of temp Strings, is it worth
|
// TODO we're going to allocate a whole bunch of temp Strings, is it worth
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue