Skip to content

Commit

Permalink
eyre-rs#198 - fix: Runned cargo fmt to try fix rustfmt ci errors
Browse files Browse the repository at this point in the history
  • Loading branch information
afmireski committed Nov 21, 2024
1 parent 5f074ef commit 911b196
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions color-eyre/src/section/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,25 +327,31 @@ pub trait Section: crate::private::Sealed {
/// ```rust,should_panic
/// use color_eyre::Section;
/// use eyre::{eyre, Result};
///
///
///
/// fn main() -> Result<()> {
/// color_eyre::install()?;
///
///
///
/// if let Err(err) = do_stuff() {
/// let final_report = eyre!("Program failure with a unexpected error")
/// .report(err);
/// return Err(final_report);
/// }
///
///
///
/// Ok(())
/// }
///
///
///
/// fn do_stuff() -> Result<()> {
/// let err = eyre!("Some thing gets wrong");
///
///
///
/// Err(err)
/// }
///
///
///
/// ```
fn report(self, report: Report) -> Self::Return;

Expand All @@ -357,25 +363,31 @@ pub trait Section: crate::private::Sealed {
/// ```rust,should_panic
/// use color_eyre::Section;
/// use eyre::{eyre, Result};
///
///
///
/// fn main() -> Result<()> {
/// color_eyre::install()?;
///
///
///
/// if let Err(err) = do_stuff() {
/// let final_report = eyre!("Program failure with a unexpected error")
/// .with_report(|| err);
/// return Err(final_report);
/// }
///
///
///
/// Ok(())
/// }
///
///
///
/// fn do_stuff() -> Result<()> {
/// let err = eyre!("Some thing gets wrong");
///
///
///
/// Err(err)
/// }
///
///
///
/// ```
fn with_report<F>(self, report: F) -> Self::Return
where
Expand Down

0 comments on commit 911b196

Please sign in to comment.