Skip to content

fix(backoff): fibonacci delay should cap on max delay#232

Open
dentiny wants to merge 1 commit intoXuanwo:mainfrom
dentiny:hjiang/cap-max-delay-fibonacci
Open

fix(backoff): fibonacci delay should cap on max delay#232
dentiny wants to merge 1 commit intoXuanwo:mainfrom
dentiny:hjiang/cap-max-delay-fibonacci

Conversation

@dentiny
Copy link
Copy Markdown

@dentiny dentiny commented Mar 31, 2026

Closes #231

@dentiny dentiny force-pushed the hjiang/cap-max-delay-fibonacci branch from b88a255 to 0e8291b Compare March 31, 2026 23:10
@dentiny
Copy link
Copy Markdown
Author

dentiny commented Mar 31, 2026

error: creating a new box
   --> backon-macros/src/lib.rs:100:9
    |
100 |         item_fn.block = Box::new(block);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace existing content with inner value instead: `*item_fn.block = block`
    |
    = note: this creates a needless allocation
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#replace_box
    = note: `-D clippy::replace-box` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::repla

The failed CI doesn't seem to be related to my change

@dentiny
Copy link
Copy Markdown
Author

dentiny commented Mar 31, 2026

Nightly unit failure also seems unrelated

EXPECTED:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error: `adjust` is only available for async functions
 --> tests/cases/fail_adjust_blocking.rs:8:4
  |
8 | fn invalid_blocking() -> Result<(), &'static str> {
  |    ^^^^^^^^^^^^^^^^

error[E0425]: cannot find function `invalid_blocking` in this scope
  --> tests/cases/fail_adjust_blocking.rs:13:13
   |
13 |     let _ = invalid_blocking();
   |             ^^^^^^^^^^^^^^^^ not found in this scope
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈

ACTUAL OUTPUT:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error: `adjust` is only available for async functions
 --> tests/cases/fail_adjust_blocking.rs:8:4
  |
8 | fn invalid_blocking() -> Result<(), &'static str> {
  |    ^^^^^^^^^^^^^^^^
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
note: If the actual output is the correct output you can bless it by rerunning
      your test with the environment variable TRYBUILD=overwrite

test tests/cases/fail_context_ident.rs [should fail to compile] ... ok
test tests/cases/fail_method_self_context.rs [should fail to compile] ... ok
test tests/cases/fail_method_mut_context.rs [should fail to compile] ... ok
test tests/cases/fail_context_value_self.rs [should fail to compile] ... ok


test trybuild_suite ... FAILED

failures:

---- trybuild_suite stdout ----

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: fibonacci backoff should cap max delay

1 participant