summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/roadmap2dot.rs10
-rw-r--r--src/lib.rs4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/bin/roadmap2dot.rs b/src/bin/roadmap2dot.rs
index 25cbc34..e361efb 100644
--- a/src/bin/roadmap2dot.rs
+++ b/src/bin/roadmap2dot.rs
@@ -12,22 +12,24 @@
//! crate will be as a library.
use roadmap::Roadmap;
-use structopt::StructOpt;
-use std::path::PathBuf;
use std::fs::File;
use std::io::Read;
+use std::path::PathBuf;
+use structopt::StructOpt;
const LABEL_WIDTH: usize = 30;
#[derive(Debug, StructOpt)]
-#[structopt(name = "roadmap2dot", about = "Create a dot graph of a roadmap in YAML")]
+#[structopt(
+ name = "roadmap2dot",
+ about = "Create a dot graph of a roadmap in YAML"
+)]
struct Opt {
// The input filename.
#[structopt(parse(from_os_str))]
filename: PathBuf,
}
-
fn main() -> Result<(), Box<dyn std::error::Error>> {
let opt = Opt::from_args();
let mut text = String::new();
diff --git a/src/lib.rs b/src/lib.rs
index b186ee4..8105477 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -220,9 +220,7 @@ impl Roadmap {
fn count_goals(&self) -> usize {
self.steps
.iter()
- .map(|step| {
- self.is_goal(step)
- })
+ .map(|step| self.is_goal(step))
.filter(|b| *b)
.count()
}