Skip to content

Upgrading snafu 0.8 to 0.9

Breaking0.8.9 → 0.9.2Breaking7Platform2New3Changed1Fixed3

BreakingUpgrade verdict

7 breaking changes and 2 platform requirement changes.

  • Opaque errors accept more convertible source values by default.
  • Three feature flags have been removed.
  • Under the unstable provider API, source errors are no longer provided automatically.
  • Under the unstable provider API, chaining of provided values is no longer supported.
Top 5 of 9 that need code or config changes

Rust requirement changed in 0.9.0: 1.56 → 1.65.

Installs 29 packages in all (was 27).

Breaking7
Opaque errors now default to constructing from any value implementing Into for the wrapped type.
Into#[snafu(source(from(exact)))]
Removes the rust_1_61, rust_1_65, and unstable-core-error feature flags.
rust_1_61rust_1_65unstable-core-error
With unstable-provider-api, the source error is no longer provided by default.
unstable-provider-apiWhateverWhateverLocal
With unstable-provider-api, provided values can no longer be chained or have chaining priority assigned.
unstable-provider-api
Makes Whatever implement Send and Sync, requiring wrapped errors to also be Send and Sync.
WhateverSendSync
Replaces snafu::Location with an alias to &'static core::panic::Location<'static>.
snafu::Locationcore::panic::Location
Stops generating the deprecated Error::description and Error::cause methods.
Error::descriptionError::cause
Platform2
Raises the minimum supported Rust version to 1.65.
Raises the default supported Rust version to 1.81.