diff --git a/codespan-reporting/src/term/views/diagnostic.rs b/codespan-reporting/src/term/views/diagnostic.rs index 26271fb..2e605cf 100644 --- a/codespan-reporting/src/term/views/diagnostic.rs +++ b/codespan-reporting/src/term/views/diagnostic.rs @@ -9,10 +9,7 @@ use crate::term::Config; use super::{Header, Locus, NewLine, SourceSnippet}; /// Output a richly formatted diagnostic, with source code previews. -pub struct RichDiagnostic<'a, Source> -where - Source: AsRef, -{ +pub struct RichDiagnostic<'a, Source> { files: &'a Files, diagnostic: &'a Diagnostic, } @@ -70,10 +67,7 @@ where } /// Output a short diagnostic, with a line number, severity, and message. -pub struct ShortDiagnostic<'a, Source> -where - Source: AsRef, -{ +pub struct ShortDiagnostic<'a, Source> { files: &'a Files, diagnostic: &'a Diagnostic, } diff --git a/codespan-reporting/src/term/views/source_snippet.rs b/codespan-reporting/src/term/views/source_snippet.rs index e5fd29d..73befb3 100644 --- a/codespan-reporting/src/term/views/source_snippet.rs +++ b/codespan-reporting/src/term/views/source_snippet.rs @@ -31,10 +31,7 @@ pub use self::underline::MarkStyle; /// = expected type `Int` /// found type `String` /// ``` -pub struct SourceSnippet<'a, Source> -where - Source: AsRef, -{ +pub struct SourceSnippet<'a, Source> { files: &'a Files, file_id: FileId, spans: Vec<(&'a Label, MarkStyle)>, diff --git a/codespan/src/file.rs b/codespan/src/file.rs index 0621cbe..8a923bb 100644 --- a/codespan/src/file.rs +++ b/codespan/src/file.rs @@ -96,10 +96,7 @@ impl FileId { /// [`Rc`]: std::rc::Rc /// [`Arc`]: std::sync::Arc #[derive(Clone, Debug)] -pub struct Files -where - Source: AsRef, -{ +pub struct Files { files: Vec>, } @@ -282,10 +279,7 @@ where /// A file that is stored in the database. #[derive(Debug, Clone)] #[cfg_attr(feature = "serialization", derive(Deserialize, Serialize))] -struct File -where - Source: AsRef, -{ +struct File { /// The name of the file. name: OsString, /// The source code of the file.