fix doc and test name error

This commit is contained in:
Rob Ede 2020-08-18 17:42:21 +01:00
parent d346a0db5f
commit b9aba14563
No known key found for this signature in database
GPG Key ID: C2A3B36E841A91E6
7 changed files with 16 additions and 7 deletions

View File

@ -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<CounterInner>);
struct CounterInner {

View File

@ -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))));

View File

@ -170,7 +170,7 @@ pub struct PReceiver<T> {
inner: Rc<RefCell<Slab<PoolInner<T>>>>,
}
// The oneshots do not ever project Pin to the inner T
// The one-shots do not ever project Pin to the inner T
impl<T> Unpin for PReceiver<T> {}
impl<T> Unpin for PSender<T> {}

View File

@ -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();

View File

@ -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() }
}

View File

@ -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);

View File

@ -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);