From b08e5cca62112137f3b08f39eaa9478b8bf92c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Tue, 10 Aug 2021 19:13:02 -0400 Subject: [PATCH] format: cargo fmt --- src/chain.rs | 1 - src/error.rs | 2 +- src/lib.rs | 2 +- src/reporter.rs | 4 +--- tests/reporter.rs | 3 +-- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/chain.rs b/src/chain.rs index 9cd93a9..fe4d336 100644 --- a/src/chain.rs +++ b/src/chain.rs @@ -14,7 +14,6 @@ pub struct Chain<'a> { state: crate::chain::ChainState<'a>, } - #[derive(Clone)] pub(crate) enum ChainState<'a> { Linked { diff --git a/src/error.rs b/src/error.rs index 474ac5e..3c2a51d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -10,5 +10,5 @@ pub enum MietteError { #[error(transparent)] IoError(#[from] io::Error), #[error("The given offset is outside the bounds of its Source")] - OutOfBounds + OutOfBounds, } diff --git a/src/lib.rs b/src/lib.rs index 4d1946f..4c1ca43 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,6 +6,6 @@ pub use reporter::*; mod chain; mod error; -mod source_impls; mod protocol; mod reporter; +mod source_impls; diff --git a/src/reporter.rs b/src/reporter.rs index c49e2da..8a3454b 100644 --- a/src/reporter.rs +++ b/src/reporter.rs @@ -163,9 +163,7 @@ impl DiagnosticReporter for JokeReporter { "me, with {} {}: {}", sev, diagnostic, - diagnostic - .help() - .unwrap_or(&"have you tried not failing?") + diagnostic.help().unwrap_or(&"have you tried not failing?") )?; writeln!( f, diff --git a/tests/reporter.rs b/tests/reporter.rs index 0d3d6b9..b3aef01 100644 --- a/tests/reporter.rs +++ b/tests/reporter.rs @@ -1,8 +1,7 @@ use std::{fmt, sync::Arc}; use miette::{ - Diagnostic, DiagnosticReporter, DiagnosticSnippet, MietteError, MietteReporter, - SourceSpan, + Diagnostic, DiagnosticReporter, DiagnosticSnippet, MietteError, MietteReporter, SourceSpan, }; use thiserror::Error;