Skip to content

Commit

Permalink
fix(rt): Sleep::downcast_mut_pin() no longer extend lifetime
Browse files Browse the repository at this point in the history
This lifetime extension was a mistake.

Closes #3556

BREAKING CHANGE: The returned lifetime from `Sleep::downcast_mut_pin()`
  is no longer `'static`. This shouldn't affect most usage. This sort of
  breaking change is needed because it is _wrong_.
  • Loading branch information
seanmonstar committed Feb 5, 2024
1 parent 90eb95f commit 7206fe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rt/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl dyn Sleep {
}

/// Downcast a pinned &mut Sleep object to its original type
pub fn downcast_mut_pin<T>(self: Pin<&mut Self>) -> Option<Pin<&'static mut T>>
pub fn downcast_mut_pin<T>(self: Pin<&mut Self>) -> Option<Pin<&mut T>>
where
T: Sleep + 'static,
{
Expand Down

1 comment on commit 7206fe3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'end_to_end'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 7206fe3 Previous: 90eb95f Ratio
http2_parallel_x10_req_10kb_100_chunks_adaptive_window 24776299 ns/iter (± 18371731) 7869253 ns/iter (± 117771) 3.15

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.