Enable the case-arms clippy checks

This commit is contained in:
David Aguilar 2024-03-17 02:18:39 -07:00 committed by Ethiraric
parent 2cf6436fb1
commit f4c4e2ee4a
3 changed files with 2 additions and 6 deletions

View file

@ -30,12 +30,10 @@
//!
//! ```
#![doc(html_root_url = "https://docs.rs/yaml-rust2/0.5.0")]
#![cfg_attr(feature = "cargo-clippy", warn(clippy::pedantic))]
#![cfg_attr(
feature = "cargo-clippy",
allow(
clippy::match_same_arms,
clippy::should_implement_trait,
clippy::missing_errors_doc,
clippy::missing_panics_doc,

View file

@ -786,7 +786,6 @@ impl<T: Iterator<Item = char>> Scanner<T> {
loop {
// TODO(chenyh) BOM
match self.look_ch() {
' ' => self.skip_blank(),
// Tabs may not be used as indentation.
// "Indentation" only exists as long as a block is started, but does not exist
// inside of flow-style constructs. Tabs are allowed as part of leading
@ -806,7 +805,7 @@ impl<T: Iterator<Item = char>> Scanner<T> {
));
}
}
'\t' => self.skip_blank(),
'\t' | ' ' => self.skip_blank(),
'\n' | '\r' => {
self.lookahead(2);
self.skip_line();

View file

@ -81,7 +81,7 @@ impl MarkedEventReceiver for YamlLoader {
fn on_event(&mut self, ev: Event, _: Marker) {
// println!("EV {:?}", ev);
match ev {
Event::DocumentStart => {
Event::DocumentStart | Event::Nothing | Event::StreamStart | Event::StreamEnd => {
// do nothing
}
Event::DocumentEnd => {
@ -156,7 +156,6 @@ impl MarkedEventReceiver for YamlLoader {
};
self.insert_new_node((n, 0));
}
_ => { /* ignore */ }
}
// println!("DOC {:?}", self.doc_stack);
}