Skip to content

Commit

Permalink
Rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sciguy16 committed Nov 14, 2019
1 parent 0e020cb commit 3c2a503
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/tests/integration/basic_requests.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use futures::{future, Future, Poll, Stream};
use hyper::{self , Request, Response, Body};
use hyper::{self, Body, Request, Response};
use std::sync::Arc;
use std::{thread, time};
use tokio::net::TcpListener;
Expand All @@ -8,8 +8,8 @@ use tower_hyper::server::Server;
use url::Url;

use super::mock_server;
use crate::request;
use crate::arg_parse::GlobalOpts;
use crate::request;

#[test]
fn test_200_response() {
Expand Down
16 changes: 9 additions & 7 deletions src/tests/integration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ use tower::{builder::ServiceBuilder, Service};
use tower_hyper::server::Server;

mod basic_requests;
mod status_detection;
mod scraping;
mod status_detection;

const URL: &str = "http://[::1]:3000";

pub fn mock_server() {
pub fn mock_server() {
println!("Making a mock server");
hyper::rt::run(future::lazy(|| {
let addr = "[::1]:3000".parse().unwrap();
Expand All @@ -29,13 +29,13 @@ pub fn mock_server() {

hyper::rt::spawn(
server
.serve(stream)
.map_err(|e| panic!("Server error: {:?}", e)),
);
.serve(stream)
.map_err(|e| panic!("Server error: {:?}", e)),
);

Ok(server)
})
.map_err(|e| panic!("serve errror: {:?}", e))
.map_err(|e| panic!("serve errror: {:?}", e))
.map(|_| {})
}));
}
Expand All @@ -60,7 +60,9 @@ struct MakeSvc;
impl Service<()> for MakeSvc {
type Response = Svc;
type Error = hyper::Error;
type Future = Box<dyn Future<Item = Self::Response, Error = Self::Error> + Send + 'static>;
type Future = Box<
dyn Future<Item = Self::Response, Error = Self::Error> + Send + 'static,
>;

fn poll_ready(&mut self) -> Poll<(), Self::Error> {
Ok(().into())
Expand Down
1 change: 1 addition & 0 deletions src/tests/integration/scraping.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions src/tests/integration/status_detection.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ use log::LevelFilter::Info;
use url::Url;

mod argparse;
mod integration;
mod output;
mod output_format;
mod request_thread;
mod integration;

impl Default for GlobalOpts {
fn default() -> Self {
Expand Down

0 comments on commit 3c2a503

Please sign in to comment.