Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

A regular maintenance pass #379

Merged
merged 3 commits into from Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 10 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 0 additions & 40 deletions bitswap/src/protocol.rs
Expand Up @@ -98,43 +98,3 @@ impl From<()> for MessageWrapper {
Self::Tx
}
}

#[cfg(test)]
mod tests {
/*
use futures::prelude::*;
use libp2p::core::upgrade;
use super::*;
use tokio::net::{TcpListener, TcpStream};

// TODO: rewrite tests with the MemoryTransport
// TODO: figure out why it doesn't exit
#[test]
#[ignore]
fn test_upgrade() {
// yeah this probably did not work before
let listener = TcpListener::bind(&"127.0.0.1:0".parse().unwrap()).unwrap();
let listener_addr = listener.local_addr().unwrap();

let _server = listener
.incoming()
.into_future()
.map_err(|(e, _)| e)
.and_then(|(c, _)| {
println!("upgrading server");
upgrade::apply_inbound(c.unwrap(), BitswapConfig::default())
.map_err(|_| panic!())
})
.map(|_| ());

let _client = TcpStream::connect(&listener_addr)
.and_then(|c| {
println!("upgrading client");
upgrade::apply_outbound(c, Message::new())
.map_err(|_| panic!())
});

//tokio::run(server.select(client).map(|_| ()).map_err(|_| panic!()));
}
*/
}
1 change: 0 additions & 1 deletion http/Cargo.toml
Expand Up @@ -16,7 +16,6 @@ bytes = { default-features = false, version = "0.5" }
cid = { default-features = false, version = "0.5" }
futures = { default-features = false, version = "0.3" }
humantime = { default-features = false, version = "2.0" }
hyper = { default-features = false, version = "0.13" }
ipfs = { path = "../" }
mime = { default-features = false, version = "0.3" }
mpart-async = { default-features = false, version = "0.4" }
Expand Down
2 changes: 1 addition & 1 deletion http/src/v0/pin.rs
Expand Up @@ -254,7 +254,7 @@ async fn list_inner<T: IpfsTypes>(
}
}

fn format_json_newline<St, T, E>(st: St) -> warp::http::Response<hyper::body::Body>
fn format_json_newline<St, T, E>(st: St) -> warp::http::Response<warp::hyper::Body>
where
St: futures::stream::Stream<Item = Result<T, E>> + Send + 'static,
T: Serialize + Send + 'static,
Expand Down