Skip to content

Commit

Permalink
Merge branch 'master' into wrap-err-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yaahc authored Sep 20, 2023
2 parents a36ce88 + 044e2ae commit a8a5776
Show file tree
Hide file tree
Showing 12 changed files with 534 additions and 185 deletions.
34 changes: 29 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
on:
push:
branches:
- master
- master
pull_request: {}

name: Continuous integration

env:
MIRIFLAGS: -Zmiri-strict-provenance

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'push' && github.run_number }}
cancel-in-progress: true

jobs:
check:
name: Check
Expand All @@ -23,6 +30,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: check
args: --all

test-matrix:
name: Test Suite
Expand All @@ -49,7 +57,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: test
args: ${{ matrix.features }}
args: --all ${{ matrix.features }}

test-msrv:
name: Test Suite
Expand All @@ -66,11 +74,12 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.42
toolchain: 1.65
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --all ${{ matrix.features }}

test-os:
name: Test Suite
Expand All @@ -88,6 +97,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: test
args: --all

fmt:
name: Rustfmt
Expand All @@ -106,7 +116,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
args: --check

clippy:
name: Clippy
Expand All @@ -125,4 +135,18 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
args: --all-targets --all-features -- -D warnings
miri:
name: Miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: miri
override: true
- uses: actions-rs/cargo@v1
with:
command: miri
args: test
39 changes: 29 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,35 +1,54 @@
[workspace]
members = [
"."
]

[workspace.package]
authors = ["Jane Lusby <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/eyre-rs/eyre"
readme = "README.md"
rust-version = "1.65.0"

[workspace.dependencies]
indenter = "0.3.0"
once_cell = "1.18.0"

[package]
name = "eyre"
version = "0.6.8"
authors = ["David Tolnay <[email protected]>", "Jane Lusby <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
description = "Flexible concrete Error Reporting type built on std::error::Error with customizable Reports"
repository = "https://github.com/yaahc/eyre"
documentation = "https://docs.rs/eyre"
readme = "README.md"
categories = ["rust-patterns"]

edition = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
readme = { workspace = true }
rust-version = { workspace = true }

[features]
default = ["auto-install", "track-caller"]
auto-install = []
track-caller = []

[dependencies]
indenter = { workspace = true }
once_cell = { workspace = true }
pyo3 = { version = "0.13", optional = true, default-features = false }

[dev-dependencies]
futures = { version = "0.3", default-features = false }
rustversion = "1.0"
thiserror = "1.0"
trybuild = { version = "1.0.19", features = ["diff"] }
backtrace = "0.3.46"
anyhow = "1.0.28"
syn = { version = "1.0", features = ["full"] }
syn = { version = "2.0", features = ["full"] }
pyo3 = { version = "0.13", default-features = false, features = ["auto-initialize"] }

[dependencies]
indenter = "0.3.0"
once_cell = "1.4.0"
pyo3 = { version = "0.13", optional = true, default-features = false }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = ["--cfg", "doc_cfg"]
Expand Down
4 changes: 2 additions & 2 deletions src/context.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::error::ContextError;
use crate::error::{ContextError, ErrorImpl};
use crate::{ContextCompat, Report, StdError, WrapErr};
use core::fmt::{self, Debug, Display, Write};

Expand Down Expand Up @@ -158,7 +158,7 @@ where
D: Display,
{
fn source(&self) -> Option<&(dyn StdError + 'static)> {
Some(self.error.inner.error())
Some(ErrorImpl::error(self.error.inner.as_ref()))
}
}

Expand Down
Loading

0 comments on commit a8a5776

Please sign in to comment.