Open hack3ric opened 2 weeks ago
Oops, this failed to build on Rust <1.79 because the compiler cannot decide if [Expression]: ToOwned
:
error[E0277]: the trait bound `[SetItem]: ToOwned` is not satisfied in `Expression`
--> src/stmt.rs:245:14
|
245 | pub dev: Option<Expression>,
| ^^^^^^^^^^^^^^^^^^ within `Expression`, the trait `ToOwned` is not implemented for `[SetItem]`, which is required by `Expression: Sized`
|
= help: the trait `ToOwned` is implemented for `[T]`
note: required because it appears within the type `Expression`
--> src/expr.rs:10:10
|
10 | pub enum Expression {
| ^^^^^^^^^^
note: required by an implicit `Sized` bound in `std::option::Option`
--> /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/option.rs:572:1
...and many, many similar errors
If bumping MSRV to version this recent is not acceptable, keeping Vec
s would probably fix this issue.
Fixed MSRV build and clippy. Please have another look :)
Amazing @hack3ric!
Please allow us some more days to review it.
Added one commit that lifts 'static
restriction on borrowed values, but added a lot of lifetimes, and updated examples in README as well.
Clippy issue should be fixed now.
FYI I have another patch ready for upstream, but it depends on this PR: https://github.com/namib-project/nftables-rs/commit/52902cd79b44b2582cb57beb4c137be66660a7ba. I will submit another PR after this and I hope this too can get into v0.6.0 too :)
See each commit message for details.
These are a lot of breaking changes, so please take your time to check if they are properly done :)