Skip to content

Commit

Permalink
clean up style
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuereth committed Oct 25, 2024
1 parent 82c5dd3 commit 9f24839
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions crates/weaver_common/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
//! HTTP server for testing purposes.
use paris::error;
use std::{collections::HashMap, thread::JoinHandle};
use std::ffi::OsStr;
use std::fs::File;
use std::path::PathBuf;
use std::str::FromStr;
use std::sync::Arc;
use std::{collections::HashMap, thread::JoinHandle};
use tiny_http::{Header, Response, Server, StatusCode};

/// An error that can occur while starting the HTTP server.
Expand All @@ -28,7 +28,6 @@ pub struct ServeStaticFiles {
impl Drop for ServeStaticFiles {
/// Stops the HTTP server.
fn drop(&mut self) {
println!("DEBUG - Dropping ServeStaticFiles");
// Test to see if we can force tiny_http to kill our thread, dropping the Arc
// before we continue to try to ensure `server` is dropped, cleaning
// open threads.
Expand Down Expand Up @@ -101,10 +100,13 @@ impl ServeStaticFiles {
.expect("Failed to respond");
}
}
println!("DEBUG - Done handling ServeStaticFiles requests");
});

Ok(Self { server, port, request_handler })
Ok(Self {
server,
port,
request_handler,
})
}

/// Returns the port of the server.
Expand Down

0 comments on commit 9f24839

Please sign in to comment.