File tree 2 files changed +9
-9
lines changed
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ static DOMAIN_REGEX: &str =
36
36
/// ```
37
37
#[ derive( Debug , PartialEq , Clone ) ]
38
38
pub enum ToCheck {
39
- /// Hostname or IP addess e.g. `127.0.0.1:8080` or `localhost:80`
39
+ /// Hostname or IP address e.g. `127.0.0.1:8080` or `localhost:80`
40
40
HostnameAndPort ( String , u16 ) ,
41
41
42
42
#[ cfg( feature = "http" ) ]
@@ -131,7 +131,7 @@ impl std::str::FromStr for ToCheck {
131
131
/// * `hosts_ports_or_http_urls` - items to be check
132
132
/// * `timeout` - `None` means that it it may wait forever or `Some(..)` set timeout in milis
133
133
/// * `start_time` - Optional time_tracker
134
- /// * `silent` - supresses output to console if true
134
+ /// * `silent` - suppresses output to console if true
135
135
///
136
136
/// # Returns
137
137
/// `Vec` with `Option` - `Some(..)` with elapsed time in milis on success `None` otherwise.
Original file line number Diff line number Diff line change @@ -11,15 +11,15 @@ use std::{
11
11
} ;
12
12
13
13
pub struct TestServer {
14
- exitting : Arc < AtomicBool > ,
14
+ exiting : Arc < AtomicBool > ,
15
15
}
16
16
17
17
impl TestServer {
18
18
pub fn new ( port : u16 , timeout : Duration ) -> Self {
19
- let exitting = Arc :: new ( AtomicBool :: new ( false ) ) ;
20
- let exitting_cloned = exitting . clone ( ) ;
19
+ let exiting = Arc :: new ( AtomicBool :: new ( false ) ) ;
20
+ let exiting_cloned = exiting . clone ( ) ;
21
21
thread:: spawn ( move || {
22
- let exitting = exitting_cloned ;
22
+ let exiting = exiting_cloned ;
23
23
thread:: sleep ( timeout) ;
24
24
let listener = TcpListener :: bind ( format ! ( "127.0.0.1:{}" , port) ) . expect ( "can't connect" ) ;
25
25
listener
47
47
}
48
48
Err ( _) => { }
49
49
}
50
- if exitting . as_ref ( ) . load ( Ordering :: Relaxed ) {
50
+ if exiting . as_ref ( ) . load ( Ordering :: Relaxed ) {
51
51
break ;
52
52
}
53
53
}
54
54
} ) ;
55
- Self { exitting }
55
+ Self { exiting }
56
56
}
57
57
}
58
58
59
59
impl Drop for TestServer {
60
60
fn drop ( & mut self ) {
61
- self . exitting . store ( true , Ordering :: Relaxed ) ;
61
+ self . exiting . store ( true , Ordering :: Relaxed ) ;
62
62
}
63
63
}
You can’t perform that action at this time.
0 commit comments