espresso-sequencer
espresso-sequencer copied to clipboard
Bump derive_more from 0.99.18 to 1.0.0
Bumps derive_more from 0.99.18 to 1.0.0.
Release notes
Sourced from derive_more's releases.
v1.0.0 - Finally a stable release
derive_moreis a library that adds derives for many of the standard library traits. By using this library the following code just works:use derive_more::{Add, Display, From, Into};#[derive(PartialEq, From, Add)] struct MyInt(i32);
#[derive(PartialEq, From, Into)] struct Point2D { x: i32, y: i32, }
#[derive(PartialEq, From, Add, Display)] enum MyEnum { #[display("int: {_0}")] Int(i32), Uint(u32), #[display("nothing")] Nothing, }
assert!(MyInt(11) == MyInt(5) + 6.into()); assert!((5, 6) == Point2D { x: 5, y: 6 }.into()); assert!(MyEnum::Int(15) == (MyEnum::Int(8) + 7.into()).unwrap()); assert!(MyEnum::Int(15).to_string() == "int: 15"); assert!(MyEnum::Uint(42).to_string() == "42"); assert!(MyEnum::Nothing.to_string() == "nothing");
Now, more than 8 years after the first commit and almost 5 years after the 0.99.0 release,
derive_morehas finally reached its 1.0.0 release. This release contains a lot of changes (including some breaking ones) to make it easier to use the derives and make it possible to extend them without having to break backwards compatibility again. There are five major changes that I would like to call out, but there are many more changes that are documented below:
- There is a new
Debugderive that can be used to easily customizeDebugformatting.- A greatly improved
Displayderive, which allows you to do anything thatthiserrorprovides, but it works for any type not just errors. And by combining theDisplayderive with theErrorandFromderives, there shouldn't really be any need to usethiserroranymore (if you are missing a feature/behaviour fromthiserrorplease report an issue).- Traits that can return errors now return a type that implements
Errorwhen an error occurs instead of a&'static str.- When using
use derive_more::SomeTraitthe actual trait is also imported not just the derive macro. This is especially useful forErrorandDisplay- The docs are now rendered on docs.rs and are much better overall.
Breaking changes
- The minimum supported Rust version (MSRV) is now Rust 1.75.
- Add the
stdfeature which should be disabled inno_stdenvironments.- All Cargo features, except
std, are now disabled by default. Thefullfeature can be used to get the old behavior of supporting all possible derives.- The
TryFrom,Add,Sub,BitAnd,BitOr,BitXor,NotandNegderives now return a dedicated error type instead of a&'static stron error.- The
FromStrderive now uses a dedicatedFromStrErrorerror type instead of generating unique one each time.- The
Displayderive (and otherfmt-like ones) now uses#[display("...", (<expr>),*)]syntax instead of#[display(fmt = "...", ("<expr>"),*)], and#[display(bound(<bound>))]instead of#[display(bound = "<bound>")]. So without the double quotes around the expressions and bounds.- The
DebugandDisplayderives (and otherfmt-like ones) now transparently delegate to the inner type when#[display("...", (<expr>),*)]attribute is trivially substitutable with a transparent call. (#322)
... (truncated)
Changelog
Sourced from derive_more's changelog.
1.0.0 - 2024-08-07
More than 8 years after the first commit and almost 5 years after the 0.99.0 release,
derive_morehas finally reached its 1.0.0 release. This release contains a lot of changes (including some breaking ones) to make it easier to use the derives and make it possible to extend them without having to break backwards compatibility again. There are five major changes that I would like to call out, but there are many more changes that are documented below:
- There is a new
Debugderive that can be used to easily customizeDebugformatting.- A greatly improved
Displayderive, which allows you to do anything thatthiserrorprovides, but it works for any type not just errors. And by combining theDisplayderive with theErrorandFromderives, there shouldn't really be any need to usethiserroranymore (if you are missing a feature/behaviour fromthiserrorplease report an issue).- Traits that can return errors now return a type that implements
Errorwhen an error occurs instead of a&'static str.- When using
use derive_more::SomeTraitthe actual trait is also imported not just the derive macro. This is especially useful forErrorandDisplay- The docs are now rendered on docs.rs and are much better overall.
Breaking changes
- The minimum supported Rust version (MSRV) is now Rust 1.75.
- Add the
stdfeature which should be disabled inno_stdenvironments.- All Cargo features, except
std, are now disabled by default. Thefullfeature can be used to get the old behavior of supporting all possible derives.- The
TryFrom,Add,Sub,BitAnd,BitOr,BitXor,NotandNegderives now return a dedicated error type instead of a&'static stron error.- The
FromStrderive now uses a dedicatedFromStrErrorerror type instead of generating unique one each time.- The
Displayderive (and otherfmt-like ones) now uses#[display("...", (<expr>),*)]syntax instead of#[display(fmt = "...", ("<expr>"),*)], and#[display(bound(<bound>))]instead of#[display(bound = "<bound>")]. So without the double quotes around the expressions and bounds.- The
DebugandDisplayderives (and otherfmt-like ones) now transparently delegate to the inner type when#[display("...", (<expr>),*)]attribute is trivially substitutable with a transparent call. (#322)- The
DebugCustomderive is renamed to justDebug(gated now under a separatedebugfeature), and its semantics were changed to be a superset ofstdvariant ofDebug.- The
Fromderive doesn't deriveFrom<()>for enum variants without any fields anymore. This feature was removed because it was considered useless in
... (truncated)
Commits
d7f5b9echore: Release40201b1Update release date to be correct88863caUpdate changelog wordingb713835Improve error when not enabling any features330e425Order features in Cargo.toml alphabetically84f2cbbUpdate README and CHANGELOG in preparation of 1.0.0e8d60cfAdd compile_fail test for on purpose limited bounds (#393, #392)f665d18Make anyhow reference a bit less strong6d632b2Add release announcement (#390)e87ab13Don't create git tags for derive_more-impl (#391)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)