Skip to content

Commit 4eec6f8

Browse files
committed
feat: re-export everything from eyre
color-eyre is just a thin wrapper around eyre and should behave the same. This includes the API. For this purpose all items that are publicly available in eyre should be available without another submodule from color-eyre.
1 parent 9905963 commit 4eec6f8

24 files changed

Lines changed: 63 additions & 77 deletions

color-eyre/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ color-eyre = "0.6"
3232
And install the panic and error report handlers:
3333

3434
```rust
35-
use color_eyre::eyre::Result;
35+
use color_eyre::Result;
3636

3737
fn main() -> Result<()> {
3838
color_eyre::install()?;
@@ -129,7 +129,7 @@ to contain `stderr` and `stdout` from a failed command, taken from
129129
[`examples/custom_section.rs`]:
130130

131131
```rust
132-
use color_eyre::{eyre::eyre, SectionExt, Section, eyre::Report};
132+
use color_eyre::{eyre, SectionExt, Section, Report};
133133
use std::process::Command;
134134
use tracing::instrument;
135135

color-eyre/examples/custom_filter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use color_eyre::{Section, eyre::Report, eyre::ResultExt};
1+
use color_eyre::{Report, ResultExt, Section};
22
use tracing::{info, instrument};
33

44
#[instrument]

color-eyre/examples/custom_section.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
use color_eyre::{
2-
Section, SectionExt,
3-
eyre::Report,
4-
eyre::{ResultExt, eyre},
2+
Report, Section, SectionExt, {eyre, ResultExt},
53
};
64
use std::process::Command;
75
use tracing::instrument;

color-eyre/examples/debug_perf.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
//! example for manually testing the perf of color-eyre in debug vs release
22
3-
use color_eyre::{
4-
Section,
5-
eyre::Report,
6-
eyre::{ResultExt, eyre},
7-
};
3+
use color_eyre::{eyre, Report, ResultExt, Section};
84
use tracing::instrument;
95

106
fn main() -> Result<(), Report> {

color-eyre/examples/github_issue.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![allow(dead_code, unused_imports)]
2-
use color_eyre::eyre;
3-
use eyre::{Report, Result};
2+
use color_eyre::{
3+
eyre, {Report, Result},
4+
};
45
use tracing::instrument;
56

67
#[instrument]

color-eyre/examples/multiple_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use color_eyre::{Section, eyre::Report, eyre::eyre};
1+
use color_eyre::{eyre, Report, Section};
22
use thiserror::Error;
33

44
fn main() -> Result<(), Report> {

color-eyre/examples/panic_compose.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use color_eyre::eyre::Report;
1+
use color_eyre::Report;
22
use tracing::instrument;
33

44
#[instrument]

color-eyre/examples/panic_hook.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use color_eyre::eyre::Report;
1+
use color_eyre::Report;
22
use tracing::instrument;
33

44
#[instrument]

color-eyre/examples/theme.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use color_eyre::{Section, config::Theme, eyre::Report, owo_colors::style};
1+
use color_eyre::{config::Theme, owo_colors::style, Report, Section};
22

33
/// To experiment with theme values, edit `theme()` below and execute `cargo run --example theme`
44
fn theme() -> Theme {

color-eyre/examples/theme_test_helper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
//! See "tests/theme.rs" for more information.
66
7-
use color_eyre::{Section, eyre::Report};
7+
use color_eyre::{Report, Section};
88

99
#[rustfmt::skip]
1010
#[derive(Debug, thiserror::Error)]

0 commit comments

Comments
 (0)