make build succeed

This commit is contained in:
Rob Ede 2020-09-28 23:35:02 +01:00
parent 6b98cf4252
commit 67bb58710b
No known key found for this signature in database
GPG key ID: C2A3B36E841A91E6
4 changed files with 30 additions and 29 deletions

4
Cargo.lock generated
View file

@ -1007,7 +1007,6 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1016,6 +1015,7 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"semver-parser 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver-parser 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1121,7 +1121,7 @@ dependencies = [
"route-recognizer 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "route-recognizer 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
"rustsec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustsec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sass-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "sass-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.116 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.57 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.57 (registry+https://github.com/rust-lang/crates.io-index)",

View file

@ -24,7 +24,7 @@ maud = "0.22"
relative-path = { version = "0.3.7", features = ["serde"] } relative-path = { version = "0.3.7", features = ["serde"] }
route-recognizer = "0.1.12" route-recognizer = "0.1.12"
rustsec = "0.6.0" rustsec = "0.6.0"
semver = { version = "0.9.0", features = ["serde"] } semver = { version = "0.11", features = ["serde"] }
serde = "1.0.27" serde = "1.0.27"
serde_derive = "1.0.27" serde_derive = "1.0.27"
serde_json = "1.0.9" serde_json = "1.0.9"

View file

@ -70,7 +70,7 @@ impl ManifestCrawler {
} }
fn process_workspace(&mut self, base_path: &RelativePathBuf, members: &[RelativePathBuf], output: &mut ManifestCrawlerStepOutput) { fn process_workspace(&mut self, base_path: &RelativePathBuf, members: &[RelativePathBuf], output: &mut ManifestCrawlerStepOutput) {
for mut path in members { for path in members {
if !path.ends_with("*") { if !path.ends_with("*") {
self.register_interest(base_path, path, output); self.register_interest(base_path, path, output);
} }

View file

@ -1,57 +1,57 @@
#![feature(ascii_ctype)]
#![feature(conservative_impl_trait)]
#![feature(ip_constructors)]
#![feature(proc_macro)]
#![allow(bare_trait_objects)] #![allow(bare_trait_objects)]
extern crate badge; extern crate badge;
extern crate cadence; extern crate cadence;
#[macro_use] extern crate failure; #[macro_use]
#[macro_use] extern crate futures; extern crate failure;
#[macro_use]
extern crate futures;
extern crate hyper; extern crate hyper;
extern crate hyper_tls; extern crate hyper_tls;
extern crate indexmap; extern crate indexmap;
#[macro_use] extern crate lazy_static; #[macro_use]
extern crate lazy_static;
extern crate lru_cache; extern crate lru_cache;
extern crate maud; extern crate maud;
extern crate relative_path; extern crate relative_path;
extern crate route_recognizer; extern crate route_recognizer;
extern crate rustsec; extern crate rustsec;
extern crate semver; extern crate semver;
#[macro_use] extern crate serde_derive; #[macro_use]
extern crate serde_derive;
extern crate serde; extern crate serde;
extern crate serde_json; extern crate serde_json;
extern crate shared_failure; extern crate shared_failure;
#[macro_use] extern crate slog; #[macro_use]
extern crate slog;
extern crate slog_json; extern crate slog_json;
extern crate tokio_core; extern crate tokio_core;
extern crate tokio_service; extern crate tokio_service;
extern crate toml; extern crate toml;
#[macro_use] extern crate try_future; #[macro_use]
extern crate try_future;
mod utils; mod engine;
mod interactors;
mod models; mod models;
mod parsers; mod parsers;
mod interactors;
mod engine;
mod server; mod server;
mod utils;
use std::env; use std::env;
use std::net::{IpAddr, Ipv4Addr, UdpSocket, SocketAddr}; use std::net::{IpAddr, Ipv4Addr, SocketAddr, UdpSocket};
use std::sync::Mutex; use std::sync::Mutex;
use cadence::{QueuingMetricSink, UdpMetricSink}; use cadence::{QueuingMetricSink, UdpMetricSink};
use futures::{Future, Stream}; use futures::{Future, Stream};
use hyper::Client;
use hyper::server::Http; use hyper::server::Http;
use hyper::Client;
use hyper_tls::HttpsConnector; use hyper_tls::HttpsConnector;
use slog::Drain; use slog::Drain;
use tokio_core::reactor::Core; use tokio_core::reactor::Core;
use self::server::Server;
use self::engine::Engine; use self::engine::Engine;
use self::server::Server;
fn init_metrics() -> QueuingMetricSink { fn init_metrics() -> QueuingMetricSink {
let socket = UdpSocket::bind("0.0.0.0:0").unwrap(); let socket = UdpSocket::bind("0.0.0.0:0").unwrap();
@ -64,24 +64,24 @@ fn init_metrics() -> QueuingMetricSink {
fn main() { fn main() {
let logger = slog::Logger::root( let logger = slog::Logger::root(
Mutex::new(slog_json::Json::default(std::io::stderr())).map(slog::Fuse), Mutex::new(slog_json::Json::default(std::io::stderr())).map(slog::Fuse),
o!("version" => env!("CARGO_PKG_VERSION")) o!("version" => env!("CARGO_PKG_VERSION")),
); );
let metrics = init_metrics(); let metrics = init_metrics();
let mut core = Core::new() let mut core = Core::new().expect("failed to create event loop");
.expect("failed to create event loop");
let handle = core.handle(); let handle = core.handle();
let connector = HttpsConnector::new(4, &handle) let connector = HttpsConnector::new(4, &handle).expect("failed to create https connector");
.expect("failed to create https connector");
let client = Client::configure() let client = Client::configure()
.connector(connector) .connector(connector)
.build(&core.handle()); .build(&core.handle());
let port = env::var("PORT").unwrap_or_else(|_| "8080".to_string()).parse() let port = env::var("PORT")
.unwrap_or_else(|_| "8080".to_string())
.parse()
.expect("could not read port"); .expect("could not read port");
let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), port); let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), port);
@ -93,7 +93,8 @@ fn main() {
let server = Server::new(logger.clone(), engine); let server = Server::new(logger.clone(), engine);
let serve = http.serve_addr_handle(&addr, &handle, move || Ok(server.clone())) let serve = http
.serve_addr_handle(&addr, &handle, move || Ok(server.clone()))
.expect("failed to bind server"); .expect("failed to bind server");
let serving = serve.for_each(move |conn| { let serving = serve.for_each(move |conn| {