Skip to content
This repository was archived by the owner on Mar 23, 2021. It is now read-only.

Commit 39d0e05

Browse files
Merge #1732
1732: Remove explicit dependency on http r=thomaseizinger a=thomaseizinger Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2 parents 03009c3 + 2b620aa commit 39d0e05

File tree

7 files changed

+8
-7
lines changed

7 files changed

+8
-7
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cnd/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ futures = { version = "0.1" }
3030
futures-core = { version = "=0.3.0-alpha.19", features = ["alloc", "compat", "async-await"], package = "futures-preview" }
3131
hex = "0.4"
3232
hex-serde = "0.1.0"
33-
http = "0.1"
3433
http-api-problem = "0.13"
3534
hyper = "0.12"
3635
lazy_static = "1"

cnd/src/http_api/action.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ use crate::{
1313
};
1414
use anyhow::Context;
1515
use blockchain_contracts::bitcoin::witness;
16-
use http::StatusCode;
1716
use http_api_problem::HttpApiProblem;
1817
use serde::{Deserialize, Serialize};
1918
use std::convert::Infallible;
19+
use warp::http::StatusCode;
2020

2121
pub trait ToSirenAction {
2222
fn to_siren_action(&self, id: &SwapId) -> siren::Action;

cnd/src/http_api/problem.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ use crate::{
55
InvalidAction, InvalidActionInvocation,
66
},
77
};
8-
use http::StatusCode;
98
use http_api_problem::HttpApiProblem;
10-
use warp::{Rejection, Reply};
9+
use warp::{
10+
http::{self, StatusCode},
11+
Rejection, Reply,
12+
};
1113

1214
#[derive(Debug, thiserror::Error)]
1315
#[error("Missing GET parameters for a {} action type. Expected: {:?}", action, parameters.iter().map(|parameter| parameter.name).collect::<Vec<&str>>())]

cnd/src/http_api/routes/rfc003/handlers/action.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use anyhow::Context;
2828
use futures::Stream;
2929
use libp2p_comit::frame::Response;
3030
use std::fmt::Debug;
31+
use warp::http;
3132

3233
#[allow(clippy::unit_arg, clippy::let_unit_value, clippy::cognitive_complexity)]
3334
pub async fn handle_action<D: StateStore + Network + Spawn + SwapSeed + Saver + DetermineTypes>(

cnd/src/http_api/routes/rfc003/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use crate::{
2525
use futures::Future;
2626
use futures_core::future::{FutureExt, TryFutureExt};
2727
use hyper::header;
28-
use warp::{Rejection, Reply};
28+
use warp::{http, Rejection, Reply};
2929

3030
pub use self::swap_state::{LedgerState, SwapCommunication, SwapCommunicationState, SwapState};
3131
use crate::{db::Saver, http_api::problem};

cnd/src/http_api/swap_resource.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ use crate::{
1414
HashFunction, SwapId, SwapProtocol,
1515
},
1616
};
17-
use http::StatusCode;
1817
use http_api_problem::HttpApiProblem;
1918
use libp2p::PeerId;
2019
use serde::Serialize;
20+
use warp::http::StatusCode;
2121

2222
#[derive(Debug, Serialize)]
2323
#[serde(

0 commit comments

Comments
 (0)