Skip to content

Commit

Permalink
Appease clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Bargsteen committed Feb 16, 2024
1 parent ea74c09 commit cd6b875
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/bump-alloc-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,8 @@ fn stack_and_static(ctx: &ReceiveContext, _host: &Host<State>) -> ReceiveResult<
let original_text_len = text.len();
// Allocate a long lived box on the heap.
let long_lived: Box<Vec<u32>> = black_box(Box::new((0..n).collect()));
// Run the appender function. Wrapped in a [`black_box`] to ensure that the
// compiler won't try to optimize the internals away.
black_box(appender(&mut text, n, &on_even, ON_ODD));
// Run the appender function.
appender(&mut text, n, &on_even, ON_ODD);
// Use some of the local variables defined before the recursive call.
// Abort if `n` should have been altered.
if original_n != n {
Expand Down

0 comments on commit cd6b875

Please sign in to comment.