diff --git a/src/lib.rs b/src/lib.rs index 78d25d2..64d977f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -36,7 +36,7 @@ static DOMAIN_REGEX: &str = /// ``` #[derive(Debug, PartialEq, Clone)] pub enum ToCheck { - /// Hostname or IP addess e.g. `127.0.0.1:8080` or `localhost:80` + /// Hostname or IP address e.g. `127.0.0.1:8080` or `localhost:80` HostnameAndPort(String, u16), #[cfg(feature = "http")] @@ -131,7 +131,7 @@ impl std::str::FromStr for ToCheck { /// * `hosts_ports_or_http_urls` - items to be check /// * `timeout` - `None` means that it it may wait forever or `Some(..)` set timeout in milis /// * `start_time` - Optional time_tracker -/// * `silent` - supresses output to console if true +/// * `silent` - suppresses output to console if true /// /// # Returns /// `Vec` with `Option` - `Some(..)` with elapsed time in milis on success `None` otherwise. diff --git a/tests/common.rs b/tests/common.rs index abbdc79..9932fb9 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -11,15 +11,15 @@ use std::{ }; pub struct TestServer { - exitting: Arc, + exiting: Arc, } impl TestServer { pub fn new(port: u16, timeout: Duration) -> Self { - let exitting = Arc::new(AtomicBool::new(false)); - let exitting_cloned = exitting.clone(); + let exiting = Arc::new(AtomicBool::new(false)); + let exiting_cloned = exiting.clone(); thread::spawn(move || { - let exitting = exitting_cloned; + let exiting = exiting_cloned; thread::sleep(timeout); let listener = TcpListener::bind(format!("127.0.0.1:{}", port)).expect("can't connect"); listener @@ -47,17 +47,17 @@ OK } Err(_) => {} } - if exitting.as_ref().load(Ordering::Relaxed) { + if exiting.as_ref().load(Ordering::Relaxed) { break; } } }); - Self { exitting } + Self { exiting } } } impl Drop for TestServer { fn drop(&mut self) { - self.exitting.store(true, Ordering::Relaxed); + self.exiting.store(true, Ordering::Relaxed); } }