Skip to content

Commit acb6063

Browse files
committed
Fix lint
1 parent aedd825 commit acb6063

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

toml-span/src/error.rs

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -230,21 +230,6 @@ impl Display for Error {
230230
ErrorKind::UnexpectedValue { expected, .. } => write!(f, "expected '{expected:?}'")?,
231231
}
232232

233-
// if !self.key.is_empty() {
234-
// write!(f, " for key `")?;
235-
// for (i, k) in self.key.iter().enumerate() {
236-
// if i > 0 {
237-
// write!(f, ".")?;
238-
// }
239-
// write!(f, "{}", k)?;
240-
// }
241-
// write!(f, "`")?;
242-
// }
243-
244-
// if let Some(line) = self.line {
245-
// write!(f, " at line {} column {}", line + 1, self.col + 1)?;
246-
// }
247-
248233
Ok(())
249234
}
250235
}
@@ -262,7 +247,7 @@ impl Error {
262247

263248
use codespan_reporting::diagnostic::Label;
264249

265-
let diag = match &self.kind {
250+
match &self.kind {
266251
ErrorKind::DuplicateKey { first, .. } => diag.with_labels(vec![
267252
Label::secondary(fid, *first).with_message("first key instance"),
268253
Label::primary(fid, self.span).with_message("duplicate key"),
@@ -352,9 +337,7 @@ impl Error {
352337
ErrorKind::Custom(msg) => diag
353338
.with_message(msg.to_string())
354339
.with_labels(vec![Label::primary(fid, self.span)]),
355-
};
356-
357-
diag
340+
}
358341
}
359342
}
360343

0 commit comments

Comments
 (0)