diff --git a/actix-router/src/path.rs b/actix-router/src/path.rs index 0998c614..76fd97da 100644 --- a/actix-router/src/path.rs +++ b/actix-router/src/path.rs @@ -50,20 +50,20 @@ impl Path { } } - #[inline] /// Get reference to inner path instance + #[inline] pub fn get_ref(&self) -> &T { &self.path } - #[inline] /// Get mutable reference to inner path instance + #[inline] pub fn get_mut(&mut self) -> &mut T { &mut self.path } - #[inline] /// Path + #[inline] pub fn path(&self) -> &str { let skip = self.skip as usize; let path = self.path.path(); @@ -74,23 +74,23 @@ impl Path { } } - #[inline] /// Set new path + #[inline] pub fn set(&mut self, path: T) { self.skip = 0; self.path = path; self.segments.clear(); } - #[inline] /// Reset state + #[inline] pub fn reset(&mut self) { self.skip = 0; self.segments.clear(); } - #[inline] /// Skip first `n` chars in path + #[inline] pub fn skip(&mut self, n: u16) { self.skip += n; } @@ -109,14 +109,14 @@ impl Path { self.segments.push((name, PathItem::Static(value))); } - #[inline] /// Check if there are any matched patterns + #[inline] pub fn is_empty(&self) -> bool { self.segments.is_empty() } - #[inline] /// Check number of extracted parameters + #[inline] pub fn len(&self) -> usize { self.segments.len() } diff --git a/actix-router/src/resource.rs b/actix-router/src/resource.rs index 2ab4ceb5..3808bc25 100644 --- a/actix-router/src/resource.rs +++ b/actix-router/src/resource.rs @@ -154,8 +154,8 @@ impl ResourceDef { &self.pattern } - #[inline] /// Check if path matches this pattern. + #[inline] pub fn is_match(&self, path: &str) -> bool { match self.tp { PatternType::Static(ref s) => s == path, diff --git a/actix-server/src/builder.rs b/actix-server/src/builder.rs index 13c164f1..08ab2d09 100644 --- a/actix-server/src/builder.rs +++ b/actix-server/src/builder.rs @@ -177,8 +177,8 @@ impl ServerBuilder { Ok(self) } - #[cfg(unix)] /// Add new unix domain service to the server. + #[cfg(unix)] pub fn bind_uds(self, name: N, addr: U, factory: F) -> io::Result where F: ServiceFactory, @@ -198,10 +198,10 @@ impl ServerBuilder { self.listen_uds(name, lst, factory) } - #[cfg(unix)] /// Add new unix domain service to the server. /// Useful when running as a systemd service and /// a socket FD can be acquired using the systemd crate. + #[cfg(unix)] pub fn listen_uds>( mut self, name: N, diff --git a/actix-utils/src/task.rs b/actix-utils/src/task.rs index 8f85f5e4..2a3469cf 100644 --- a/actix-utils/src/task.rs +++ b/actix-utils/src/task.rs @@ -40,16 +40,16 @@ impl LocalWaker { since = "2.1.0", note = "In favor of `wake`. State of the register doesn't matter at `wake` up" )] - #[inline] /// Check if waker has been registered. + #[inline] pub fn is_registered(&self) -> bool { unsafe { (*self.waker.get()).is_some() } } - #[inline] /// Registers the waker to be notified on calls to `wake`. /// /// Returns `true` if waker was registered before. + #[inline] pub fn register(&self, waker: &Waker) -> bool { unsafe { let w = self.waker.get(); @@ -58,20 +58,20 @@ impl LocalWaker { } } - #[inline] /// Calls `wake` on the last `Waker` passed to `register`. /// /// If `register` has not been called yet, then this does nothing. + #[inline] pub fn wake(&self) { if let Some(waker) = self.take() { waker.wake(); } } - #[inline] /// Returns the last `Waker` passed to `register`, so that the user can wake it. /// /// If a waker has not been registered, this returns `None`. + #[inline] pub fn take(&self) -> Option { unsafe { (*self.waker.get()).take() } }