Update deps and cargo fix to 2018
This commit is contained in:
parent
9c48c9ef1b
commit
92e5ab998e
7 changed files with 860 additions and 637 deletions
1473
Cargo.lock
generated
1473
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -10,8 +10,8 @@ use failure::{err_msg, Error};
|
|||
use notify::{self, RecommendedWatcher, RecursiveMode, Watcher};
|
||||
use walkdir::WalkDir;
|
||||
|
||||
use Hook;
|
||||
use {HOOKS, PROGRAMS};
|
||||
use crate::Hook;
|
||||
use crate::{HOOKS, PROGRAMS};
|
||||
|
||||
/// The configuration to be parsed from the command line.
|
||||
#[derive(Debug, StructOpt)]
|
||||
|
|
|
@ -13,7 +13,7 @@ use sha1::Sha1;
|
|||
use structopt::StructOpt;
|
||||
use toml::Value as TomlValue;
|
||||
|
||||
use handler::Environment;
|
||||
use crate::handler::Environment;
|
||||
|
||||
#[derive(StructOpt)]
|
||||
struct Opt {
|
||||
|
|
|
@ -13,7 +13,7 @@ use tokio::io::write_all;
|
|||
use tokio_process::CommandExt;
|
||||
use toml::Value as TomlValue;
|
||||
|
||||
use github;
|
||||
use crate::github;
|
||||
|
||||
/// A single instance of handler as defined by the config.
|
||||
#[derive(Clone, Debug)]
|
||||
|
@ -99,7 +99,7 @@ impl Handler {
|
|||
.stderr(Stdio::piped());
|
||||
};
|
||||
|
||||
let output: Box<Future<Item = JsonValue, Error = Error> + Send> = match action {
|
||||
let output: Box<dyn Future<Item = JsonValue, Error = Error> + Send> = match action {
|
||||
Action::Builtin(ref func) => {
|
||||
let workdir = temp_path_cp.clone();
|
||||
let env = Environment { workdir };
|
||||
|
|
|
@ -10,7 +10,7 @@ use serde_json::Value as JsonValue;
|
|||
use tokio::{self, prelude::*};
|
||||
use toml::Value;
|
||||
|
||||
use Handler;
|
||||
use crate::Handler;
|
||||
|
||||
/// A webhook.
|
||||
pub struct Hook {
|
||||
|
|
|
@ -50,10 +50,10 @@ use hyper::service::service_fn;
|
|||
use hyper::Server;
|
||||
use regex::Regex;
|
||||
|
||||
pub use config::Config;
|
||||
pub use handler::*;
|
||||
use hook::*;
|
||||
use service::*;
|
||||
pub use crate::config::Config;
|
||||
pub use crate::handler::*;
|
||||
use crate::hook::*;
|
||||
use crate::service::*;
|
||||
|
||||
const URIPATTERN_STR: &str = r"/webhook/(?P<name>[A-Za-z._][A-Za-z0-9._]*)";
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@ use futures::{future, Future, Stream};
|
|||
use hyper::{Body, Error, Request, Response, StatusCode};
|
||||
use mktemp::Temp;
|
||||
|
||||
use {HOOKS, URIPATTERN};
|
||||
use crate::{HOOKS, URIPATTERN};
|
||||
|
||||
pub(crate) fn dip_service(
|
||||
req: Request<Body>,
|
||||
) -> Box<Future<Item = Response<Body>, Error = Error> + Send> {
|
||||
) -> Box<dyn Future<Item = Response<Body>, Error = Error> + Send> {
|
||||
let path = req.uri().path().to_owned();
|
||||
let captures = match URIPATTERN.captures(path.as_ref()) {
|
||||
Some(value) => value,
|
||||
|
|
Loading…
Reference in a new issue