Skip to content

Commit eb00f2c

Browse files
committed
add Safety doc in format demanded by clippy
1 parent 69f7db7 commit eb00f2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils/wakers/shared_arc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ use std::sync::Arc;
4343

4444
/// A trait to be implemented on [super::WakerArray] and [super::WakerVec] for polymorphism.
4545
/// These are the type that goes in the Arc. They both contain the Readiness and the redirect array/vec.
46+
/// # Safety
47+
/// The `get_redirect_slice` method MUST always return the same slice for the same self.
4648
pub(super) unsafe trait SharedArcContent {
47-
/// Get the reference of the redirect slice. This is used to compute the index.
48-
/// This method MUST always return the same slice for the same self.
49-
/// Failure to do so may lead to unsafety.
49+
/// Get the reference of the redirect slice.
5050
fn get_redirect_slice(&self) -> &[*const Self];
5151

5252
/// Called when the subfuture at the specified index should be polled.

0 commit comments

Comments
 (0)