mirror of https://github.com/fafhrd91/actix-net
fix doc and test name error
This commit is contained in:
parent
d346a0db5f
commit
b9aba14563
|
@ -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 {
|
||||
|
|
|
@ -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))));
|
||||
|
|
|
@ -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> {}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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() }
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue