hawkw / thingbuf

in-place allocation-reusing queues for Rust
MIT License
292 stars 24 forks source link

Add the ability to construct StaticChannels with a recycle #87

Open Dr-Emann opened 6 months ago

Dr-Emann commented 6 months ago

There wasn't actually a way to create a StaticChannel with a non-default recycle policy. This adds a with_recycle associated function for both async and blocking StaticChannels

Dr-Emann commented 6 months ago

Failures appear to be https://github.com/rust-lang/rust/issues/124800. I'm hoping that gets fixed in a way that doesn't requiring adding a build.rs, so for now, parking.

Urgau commented 6 months ago

Heads up, with the release of rust-lang/cargo#13913 (in nightly-2024-05-19), Cargo has now gain the ability to declare --check-cfg args directly inside the [lints] table with [lints.rust.unexpected_cfgs.check-cfg][^1]:

Cargo.toml:

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(foo)'] }

Note that the diagnostic output of the lint has been updated to suggest the [lints] approach first. You can use it to guide you through the --check-cfg arguments that may need to be added.

[^1]: take effect on Rust 1.80 (current nightly), is ignored on Rust 1.79 (current beta), and produce an unused warning below