diff --git a/actix-utils/src/counter.rs b/actix-utils/src/counter.rs index ceaa727c..4fe9dd0a 100644 --- a/actix-utils/src/counter.rs +++ b/actix-utils/src/counter.rs @@ -7,7 +7,7 @@ use crate::task::LocalWaker; #[derive(Clone)] /// Simple counter with ability to notify task on reaching specific number /// -/// Counter could be cloned, total ncount is shared across all clones. +/// Counter could be cloned, total n-count is shared across all clones. pub struct Counter(Rc); struct CounterInner { diff --git a/actix-utils/src/inflight.rs b/actix-utils/src/inflight.rs index f07e4592..5ed987c7 100644 --- a/actix-utils/src/inflight.rs +++ b/actix-utils/src/inflight.rs @@ -152,7 +152,7 @@ mod tests { } #[actix_rt::test] - async fn test_newtransform() { + async fn test_new_transform() { let wait_time = Duration::from_millis(50); let srv = apply(InFlight::new(1), fn_factory(|| ok(SleepService(wait_time)))); diff --git a/actix-utils/src/oneshot.rs b/actix-utils/src/oneshot.rs index 16f2c4b4..e75fad60 100644 --- a/actix-utils/src/oneshot.rs +++ b/actix-utils/src/oneshot.rs @@ -170,7 +170,7 @@ pub struct PReceiver { inner: Rc>>>, } -// The oneshots do not ever project Pin to the inner T +// The one-shots do not ever project Pin to the inner T impl Unpin for PReceiver {} impl Unpin for PSender {} diff --git a/actix-utils/src/order.rs b/actix-utils/src/order.rs index ba589f30..c418f1d3 100644 --- a/actix-utils/src/order.rs +++ b/actix-utils/src/order.rs @@ -231,7 +231,7 @@ mod tests { } #[actix_rt::test] - async fn test_inorder() { + async fn test_in_order() { let (tx1, rx1) = oneshot::channel(); let (tx2, rx2) = oneshot::channel(); let (tx3, rx3) = oneshot::channel(); diff --git a/actix-utils/src/task.rs b/actix-utils/src/task.rs index 349e3501..dd961ad9 100644 --- a/actix-utils/src/task.rs +++ b/actix-utils/src/task.rs @@ -34,9 +34,18 @@ impl LocalWaker { } } + #[deprecated( + note = "Use correctly spelled `is_registered` method. Removal scheduled for v2.0." + )] #[inline] /// Check if waker has been registered. pub fn is_registed(&self) -> bool { + self.is_registered() + } + + #[inline] + /// Check if waker has been registered. + pub fn is_registered(&self) -> bool { unsafe { (*self.waker.get()).is_some() } } diff --git a/actix-utils/src/time.rs b/actix-utils/src/time.rs index 02a56607..2ce65bc3 100644 --- a/actix-utils/src/time.rs +++ b/actix-utils/src/time.rs @@ -173,7 +173,7 @@ mod tests { /// /// Expected Behavior: Two back-to-back calls of `LowResTimeService::now()` return the same value. #[actix_rt::test] - async fn lowres_time_service_time_does_not_immediately_change() { + async fn low_res_time_service_time_does_not_immediately_change() { let resolution = Duration::from_millis(50); let time_service = LowResTimeService::with(resolution); assert_eq!(time_service.now(), time_service.now()); @@ -210,7 +210,7 @@ mod tests { /// Expected Behavior: Two calls of `LowResTimeService::now()` made in subsequent resolution interval return different values /// and second value is greater than the first one at least by a resolution interval. #[actix_rt::test] - async fn lowres_time_service_time_updates_after_resolution_interval() { + async fn low_res_time_service_time_updates_after_resolution_interval() { let resolution = Duration::from_millis(100); let wait_time = Duration::from_millis(300); let time_service = LowResTimeService::with(resolution); diff --git a/actix-utils/src/timeout.rs b/actix-utils/src/timeout.rs index 818e6d26..f1d30f19 100644 --- a/actix-utils/src/timeout.rs +++ b/actix-utils/src/timeout.rs @@ -220,7 +220,7 @@ mod tests { } #[actix_rt::test] - async fn test_timeout_newservice() { + async fn test_timeout_new_service() { let resolution = Duration::from_millis(100); let wait_time = Duration::from_millis(500);