Skip to content

Commit

Permalink
Release 0.6.5 (#49)
Browse files Browse the repository at this point in the history
* Release 0.6.5

* (cargo-release) version 0.6.5
  • Loading branch information
yaahc authored Jul 1, 2021
1 parent 1ea7c20 commit 54933ea
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.39
toolchain: 1.42
override: true
- uses: actions-rs/cargo@v1
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
**/*.rs.bk
Cargo.lock
/.pijul/
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased] - ReleaseDate

## [0.6.5] - 2021-01-05
### Added
- add optional support for converting into `pyo3` exceptions

## [0.6.4] - 2021-01-04
### Fixed
- added missing track_caller annotations to `wrap_err` related trait methods
Expand All @@ -26,7 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0


<!-- next-url -->
[Unreleased]: https://github.com/yaahc/eyre/compare/v0.6.4...HEAD
[Unreleased]: https://github.com/yaahc/eyre/compare/v0.6.5...HEAD
[0.6.5]: https://github.com/yaahc/eyre/compare/v0.6.4...v0.6.5
[0.6.4]: https://github.com/yaahc/eyre/compare/v0.6.3...v0.6.4
[0.6.3]: https://github.com/yaahc/eyre/compare/v0.6.2...v0.6.3
[0.6.2]: https://github.com/yaahc/eyre/compare/v0.6.1...v0.6.2
Expand Down
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "eyre"
version = "0.6.4"
version = "0.6.5"
authors = ["David Tolnay <[email protected]>", "Jane Lusby <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand All @@ -21,6 +21,8 @@ thiserror = "1.0"
trybuild = { version = "1.0.19", features = ["diff"] }
backtrace = "0.3.46"
anyhow = "1.0.28"
syn = { version = "1.0", features = ["full"] }
pyo3 = { version = "0.13", default-features = false, features = ["auto-initialize"] }

[dependencies]
indenter = "0.3.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl EyreHandler for Handler {
return fmt::Debug::fmt(error, f);
}

let errors = iter::successors(Some(error), |error| error.source());
let errors = iter::successors(Some(error), |error| (*error).source());

for (ind, error) in errors.enumerate() {
write!(f, "\n{:>4}: {}", ind, error)?;
Expand Down
9 changes: 4 additions & 5 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ use core::ptr::{self, NonNull};

use core::ops::{Deref, DerefMut};

#[cfg(feature = "pyo3")]
mod pyo3_compat;

impl Report {
/// Create a new error object from any error type.
///
Expand Down Expand Up @@ -622,13 +619,12 @@ unsafe fn context_chain_downcast<D>(e: &ErrorImpl<()>, target: TypeId) -> Option
where
D: 'static,
{
let unerased = e as *const ErrorImpl<()> as *const ErrorImpl<ContextError<D, Report>>;
if TypeId::of::<D>() == target {
let unerased = e as *const ErrorImpl<()> as *const ErrorImpl<ContextError<D, Report>>;
let addr = &(*unerased)._object.msg as *const D as *mut ();
Some(NonNull::new_unchecked(addr))
} else {
// Recurse down the context chain per the inner error's vtable.
let unerased = e as *const ErrorImpl<()> as *const ErrorImpl<ContextError<D, Report>>;
let source = &(*unerased)._object.error;
(source.inner.vtable.object_downcast)(&source.inner, target)
}
Expand Down Expand Up @@ -767,3 +763,6 @@ impl AsRef<dyn StdError> for Report {
&**self
}
}

#[cfg(feature = "pyo3")]
mod pyo3_compat;
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
//! [`simple-eyre`]: https://github.com/yaahc/simple-eyre
//! [`color-spantrace`]: https://github.com/yaahc/color-spantrace
//! [`color-backtrace`]: https://github.com/athre0z/color-backtrace
#![doc(html_root_url = "https://docs.rs/eyre/0.6.4")]
#![doc(html_root_url = "https://docs.rs/eyre/0.6.5")]
#![warn(
missing_debug_implementations,
missing_docs,
Expand Down Expand Up @@ -519,7 +519,7 @@ impl StdError for InstallError {}
/// return fmt::Debug::fmt(error, f);
/// }
///
/// let errors = iter::successors(Some(error), |error| error.source());
/// let errors = iter::successors(Some(error), |error| (*error).source());
///
/// for (ind, error) in errors.enumerate() {
/// write!(f, "\n{:>4}: {}", ind, error)?;
Expand Down
1 change: 1 addition & 0 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
///
/// # fn main() -> Result<()> {
/// # let depth = 0;
/// # let err: &'static dyn std::error::Error = &ScienceError::RecursionLimitExceeded;
/// #
/// if depth > MAX_DEPTH {
/// bail!(ScienceError::RecursionLimitExceeded);
Expand Down
8 changes: 0 additions & 8 deletions tests/ui/no-impl.rs

This file was deleted.

21 changes: 0 additions & 21 deletions tests/ui/no-impl.stderr

This file was deleted.

0 comments on commit 54933ea

Please sign in to comment.