1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-27 19:12:56 +01:00
This commit is contained in:
Rob Ede 2021-07-16 21:46:32 +01:00
parent ad22a93466
commit a0fe2a9b2e
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
3 changed files with 5 additions and 4 deletions

View File

@ -211,7 +211,7 @@ mod tests {
}
fn percent_encode(data: &[u8]) -> String {
data.into_iter().map(|c| format!("%{:02X}", c)).collect()
data.iter().map(|c| format!("%{:02X}", c)).collect()
}
#[test]

View File

@ -286,7 +286,7 @@ fn new_arbiter_with_tokio() {
arb.join().unwrap();
assert_eq!(false, counter.load(Ordering::SeqCst));
assert!(!counter.load(Ordering::SeqCst));
}
#[test]

View File

@ -73,7 +73,7 @@ fn handle_pair(
/// On reaching counter limit worker would use `mio::Waker` and `WakerQueue` to wake up `Accept`
/// and notify it to update cached `Availability` again to mark worker as able to accept work again.
///
/// Hense a wake up would only happen after `Accept` increment it to limit.
/// Hence, a wake up would only happen after `Accept` increment it to limit.
/// And a decrement to limit always wake up `Accept`.
#[derive(Clone)]
pub(crate) struct Counter {
@ -179,8 +179,9 @@ impl WorkerHandleAccept {
/// Handle to worker than can send stop message to worker.
///
/// Held by [ServerBuilder](crate::builder::ServerBuilder).
#[derive(Debug)]
pub(crate) struct WorkerHandleServer {
pub idx: usize,
idx: usize,
tx: UnboundedSender<Stop>,
}