Skip to content

Commit

Permalink
add Safety doc in format demanded by clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
wishawa committed Feb 13, 2023
1 parent 69f7db7 commit eb00f2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/wakers/shared_arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ use std::sync::Arc;

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

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

0 comments on commit eb00f2c

Please sign in to comment.