diff options
author | Jovansonlee Cesar <ivanceras@gmail.com> | 2018-03-04 04:00:37 +0800 |
---|---|---|
committer | Jovansonlee Cesar <ivanceras@gmail.com> | 2018-03-04 04:00:37 +0800 |
commit | 203ea60ebe607485ad98a1d39abe208f25dcd29e (patch) | |
tree | 908c6361c571f0aead0a371af584ba88f244c9de /svgbob/examples | |
parent | c6348be56cbc7acbe667105bfe989e58a74f7dbd (diff) |
cargo fmt
Diffstat (limited to 'svgbob/examples')
-rw-r--r-- | svgbob/examples/circuits.rs | 7 | ||||
-rw-r--r-- | svgbob/examples/demo.rs | 6 | ||||
-rw-r--r-- | svgbob/examples/grid.rs | 3 | ||||
-rw-r--r-- | svgbob/examples/issue19.rs | 7 | ||||
-rw-r--r-- | svgbob/examples/spec1.rs | 10 |
5 files changed, 11 insertions, 22 deletions
diff --git a/svgbob/examples/circuits.rs b/svgbob/examples/circuits.rs index 9071126..5d10c8e 100644 --- a/svgbob/examples/circuits.rs +++ b/svgbob/examples/circuits.rs @@ -1,17 +1,14 @@ - -extern crate svgbob; extern crate svg; +extern crate svgbob; use svgbob::Grid; use svgbob::Settings; - fn main() { let file = "examples/circuits.svg"; let arg = include_str!("circuits.bob"); let g = Grid::from_str(arg, &Settings::compact()); let svg = g.get_svg(); svg::save(file, &svg).unwrap(); - println!("Saved to {}",file); + println!("Saved to {}", file); } - diff --git a/svgbob/examples/demo.rs b/svgbob/examples/demo.rs index 898b79f..b51387d 100644 --- a/svgbob/examples/demo.rs +++ b/svgbob/examples/demo.rs @@ -1,16 +1,14 @@ -extern crate svgbob; extern crate svg; +extern crate svgbob; use svgbob::Grid; use svgbob::Settings; - fn main() { let file = "examples/demo.svg"; let arg = include_str!("demo.bob"); let g = Grid::from_str(arg, &Settings::compact()); let svg = g.get_svg(); svg::save(file, &svg).unwrap(); - println!("Saved to {}",file); + println!("Saved to {}", file); } - diff --git a/svgbob/examples/grid.rs b/svgbob/examples/grid.rs index 7542f95..aea064d 100644 --- a/svgbob/examples/grid.rs +++ b/svgbob/examples/grid.rs @@ -1,9 +1,8 @@ - extern crate svgbob; use svgbob::Grid; use svgbob::Settings; -fn main(){ +fn main() { let g = Grid::from_str("a统öo͡͡͡", &Settings::compact()); } diff --git a/svgbob/examples/issue19.rs b/svgbob/examples/issue19.rs index 69a6920..25e5520 100644 --- a/svgbob/examples/issue19.rs +++ b/svgbob/examples/issue19.rs @@ -1,11 +1,9 @@ - -extern crate svgbob; extern crate svg; +extern crate svgbob; use svgbob::Grid; use svgbob::Settings; - fn main() { let file = "examples/issue19.svg"; let arg = r#" @@ -23,6 +21,5 @@ Issue 19 demo test ------- let g = Grid::from_str(arg, &Settings::compact()); let svg = g.get_svg(); svg::save(file, &svg).unwrap(); - println!("Saved to {}",file); + println!("Saved to {}", file); } - diff --git a/svgbob/examples/spec1.rs b/svgbob/examples/spec1.rs index fea7da9..88cd792 100644 --- a/svgbob/examples/spec1.rs +++ b/svgbob/examples/spec1.rs @@ -1,19 +1,17 @@ - -extern crate svgbob; extern crate svg; +extern crate svgbob; use svgbob::Grid; use svgbob::Settings; - fn main() { let file = "examples/spec1.svg"; let g = Grid::from_str(get_arg(), &Settings::no_optimization()); let svg = g.get_svg(); svg::save(file, &svg).unwrap(); - println!("Saved to {}",file); + println!("Saved to {}", file); } -fn get_arg() -> &'static str{ -r#"-+-"# +fn get_arg() -> &'static str { + r#"-+-"# } |