Skip to content

Commit

Permalink
chore: Bump thiserror from 1.0.68 to 2.0.0 (#349)
Browse files Browse the repository at this point in the history
Bumps thiserror from 1.0.68 to 2.0.0.

Release notes
Sourced from thiserror's releases.

2.0.0
Breaking changes


Referencing keyword-named fields by a raw identifier like {r#type} inside a format string is no longer accepted; simply use the unraw name like {type} (#347)
This aligns thiserror with the standard library's formatting macros, which gained support for implicit argument capture later than the release of this feature in thiserror 1.x.
#[derive(Error, Debug)]
#[error("... {type} ...")]  // Before: {r#type}
pub struct Error {
    pub r#type: Type,
}


Trait bounds are no longer inferred on fields whose value is shadowed by an explicit named argument in a format message (#345)
// Before: impl<T: Octal> Display for Error<T>
// After: impl<T> Display for Error<T>
#[derive(Error, Debug)]
#[error("{thing:o}", thing = "...")]
pub struct Error<T> {
    thing: T,
}


Tuple structs and tuple variants can no longer use numerical {0} {1} access at the same time as supplying extra positional arguments for a format message, as this makes it ambiguous whether the number refers to a tuple field vs a different positional arg (#354)
#[derive(Error, Debug)]
#[error("ambiguous: {0} {}", $N)]
//                  ^^^ Not allowed, use #[error("... {0} {n}", n = $N)]
pub struct TupleError(i32);


Code containing invocations of thiserror's derive(Error) must now have a direct dependency on the thiserror crate regardless of the error data structure's contents (#368, #369, #370, #372)


Features


Support disabling thiserror's standard library dependency by disabling the default "std" Cargo feature: thiserror = { version = "2", default-features = false } (#373)


Support using r#source as field name to opt out of a field named "source" being treated as an error's Error::source() (#350)
#[derive(Error, Debug)]
#[error("{source} ==> {destination}")]
pub struct Error {
    r#source: char,
    destination: char,




... (truncated)


Commits

6097d61 Release 2.0.0
40113bd Merge pull request #373 from dtolnay/nostd
d8ed5fb Allow disabling std dependency on 1.81+
8277ec4 Merge pull request #372 from dtolnay/stdbacktrace
d6d896d Access Backtrace exclusively through ::thiserror
d14adfb Merge pull request #371 from dtolnay/coreprovider
2e99c51 Drop Provider API support in pre-1.81 nightlies
bf3d6f3 Merge pull request #370 from dtolnay/stderror
e0e9943 Access Error trait exclusively through ::thiserror
db7825e Merge pull request #369 from dtolnay/stdpath
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 rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot merge will merge this PR after your CI passes on it
@dependabot squash and merge will squash and merge this PR after your CI passes on it
@dependabot cancel merge will cancel a previously requested merge and block automerging
@dependabot reopen will reopen this PR if it is closed
@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
@dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
@dependabot ignore this major version will 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 version will 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 dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Loading branch information
dependabot[bot] authored Nov 6, 2024
1 parent a565671 commit e39b372
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
30 changes: 25 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fatigue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ num-format = "0.4.4"
prettytable-rs = "0.10.0"
serde = "1.0.214"
serde_json = "1.0.132"
thiserror = "1.0.68"
thiserror = "2.0.0"
tokio = { version = "1.41.0", features = ["full"] }
2 changes: 1 addition & 1 deletion libfatigue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ reqwest = { version = "0.12.9", features = ["json"] }
serde = { version = "1.0.214", features = ["derive"] }
serde_json = "1.0.132"
serde_yaml = "0.9.34"
thiserror = "1.0.68"
thiserror = "2.0.0"
tokio = { version = "1.41.0", features = ["full"] }
url = "2.5.3"

0 comments on commit e39b372

Please sign in to comment.