Skip to content

Commit

Permalink
fix: spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvdb authored and shenek committed Apr 20, 2024
1 parent 52e822c commit 5432ac0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -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.
Expand Down
14 changes: 7 additions & 7 deletions tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ use std::{
};

pub struct TestServer {
exitting: Arc<AtomicBool>,
exiting: Arc<AtomicBool>,
}

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
Expand Down Expand Up @@ -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);
}
}

0 comments on commit 5432ac0

Please sign in to comment.