Skip to content

Commit bcb7828

Browse files
committed
cargo clippy --fix
1 parent 1906777 commit bcb7828

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

errful/src/protocol.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ pub trait AsErrful: Error + Sized {
9494
F::from(self.errful())
9595
}
9696

97-
fn display_pretty(&self) -> PrettyDisplay
97+
fn display_pretty(&self) -> PrettyDisplay<'_>
9898
where
9999
Self: Sized,
100100
{
101101
self.display_errful()
102102
}
103103

104-
fn display_pretty_nocolor(&self) -> PrettyDisplay
104+
fn display_pretty_nocolor(&self) -> PrettyDisplay<'_>
105105
where
106106
Self: Sized,
107107
{
@@ -140,7 +140,7 @@ pub trait Errful: Error {
140140
None
141141
}
142142

143-
fn labels(&self) -> Option<Vec<Label>> {
143+
fn labels(&self) -> Option<Vec<Label<'_>>> {
144144
None
145145
}
146146

@@ -185,7 +185,7 @@ impl<'a> Label<'a> {
185185
self.span
186186
}
187187

188-
pub fn message(&self) -> &LabelMessage {
188+
pub fn message(&self) -> &LabelMessage<'_> {
189189
&self.message
190190
}
191191
}

snippets/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl<'a> Label<'a> {
7777
}
7878

7979
impl Highlighter<'_> {
80-
fn new(source_code: &str) -> Highlighter {
80+
fn new(source_code: &str) -> Highlighter<'_> {
8181
Highlighter {
8282
source_code,
8383
context_lines: 2,
@@ -346,7 +346,7 @@ struct LineHighlighter<'a> {
346346
}
347347

348348
impl LineHighlighter<'_> {
349-
fn new(source_code: &str) -> LineHighlighter {
349+
fn new(source_code: &str) -> LineHighlighter<'_> {
350350
LineHighlighter {
351351
source_code,
352352
line: Vec::new(),

0 commit comments

Comments
 (0)