Skip to content

Commit

Permalink
*: cargo +nightly fmt --all
Browse files Browse the repository at this point in the history
rustfmt 0.99.6-nightly (750b252 2018-10-18)
  • Loading branch information
steveej committed Nov 16, 2018
1 parent 6db549f commit d4524d5
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
6 changes: 5 additions & 1 deletion graph-builder/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ pub struct Options {
pub repository: String,

/// Duration of the pause (in seconds) between scans of the registry
#[structopt(long = "period", default_value = "30", parse(try_from_str = "parse_duration"))]
#[structopt(
long = "period",
default_value = "30",
parse(try_from_str = "parse_duration")
)]
pub period: Duration,

/// Address on which the server will listen
Expand Down
2 changes: 1 addition & 1 deletion graph-builder/src/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use actix_web::http::header::{self, HeaderValue};
use actix_web::{HttpMessage, HttpRequest, HttpResponse};
use cincinnati::{AbstractRelease, CONTENT_TYPE, Graph, Release};
use cincinnati::{AbstractRelease, Graph, Release, CONTENT_TYPE};
use config;
use failure::{Error, ResultExt};
use registry;
Expand Down
5 changes: 3 additions & 2 deletions graph-builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ fn main() -> Result<(), Error> {
App::with_state(state.clone())
.middleware(Logger::default())
.route("/v1/graph", Method::GET, graph::index)
}).bind(addr)?
.run();
})
.bind(addr)?
.run();
Ok(())
}
3 changes: 2 additions & 1 deletion graph-builder/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,6 @@ fn fetch_metadata_from_layer(
serde_json::from_str(&contents).context("failed to parse cincinnati.json")
}
None => bail!("cincinnati.json not found"),
}.map_err(Into::into)
}
.map_err(Into::into)
}
2 changes: 1 addition & 1 deletion policy-engine/src/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use actix_web::http::header::{self, HeaderValue};
use actix_web::{HttpMessage, HttpRequest, HttpResponse};
use cincinnati::{CONTENT_TYPE, Graph};
use cincinnati::{Graph, CONTENT_TYPE};
use failure::Error;
use futures::{future, Future, Stream};
use hyper::{Body, Client, Request, Uri};
Expand Down
5 changes: 3 additions & 2 deletions policy-engine/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ fn main() -> Result<(), Error> {
App::with_state(state.clone())
.middleware(Logger::default())
.route("/v1/graph", Method::GET, graph::index)
}).bind((opts.address, opts.port))?
.run();
})
.bind((opts.address, opts.port))?
.run();
Ok(())
}

0 comments on commit d4524d5

Please sign in to comment.