Enable the case-arms clippy checks
This commit is contained in:
parent
7b4422bb5d
commit
e36369d69c
3 changed files with 2 additions and 6 deletions
|
@ -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", warn(clippy::pedantic))]
|
||||||
#![cfg_attr(
|
#![cfg_attr(
|
||||||
feature = "cargo-clippy",
|
feature = "cargo-clippy",
|
||||||
allow(
|
allow(
|
||||||
clippy::match_same_arms,
|
|
||||||
clippy::should_implement_trait,
|
clippy::should_implement_trait,
|
||||||
clippy::missing_errors_doc,
|
clippy::missing_errors_doc,
|
||||||
clippy::missing_panics_doc,
|
clippy::missing_panics_doc,
|
||||||
|
|
|
@ -786,7 +786,6 @@ impl<T: Iterator<Item = char>> Scanner<T> {
|
||||||
loop {
|
loop {
|
||||||
// TODO(chenyh) BOM
|
// TODO(chenyh) BOM
|
||||||
match self.look_ch() {
|
match self.look_ch() {
|
||||||
' ' => self.skip_blank(),
|
|
||||||
// Tabs may not be used as indentation.
|
// Tabs may not be used as indentation.
|
||||||
// "Indentation" only exists as long as a block is started, but does not exist
|
// "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
|
// 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' => {
|
'\n' | '\r' => {
|
||||||
self.lookahead(2);
|
self.lookahead(2);
|
||||||
self.skip_line();
|
self.skip_line();
|
||||||
|
|
|
@ -81,7 +81,7 @@ impl MarkedEventReceiver for YamlLoader {
|
||||||
fn on_event(&mut self, ev: Event, _: Marker) {
|
fn on_event(&mut self, ev: Event, _: Marker) {
|
||||||
// println!("EV {:?}", ev);
|
// println!("EV {:?}", ev);
|
||||||
match ev {
|
match ev {
|
||||||
Event::DocumentStart => {
|
Event::DocumentStart | Event::Nothing | Event::StreamStart | Event::StreamEnd => {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
Event::DocumentEnd => {
|
Event::DocumentEnd => {
|
||||||
|
@ -156,7 +156,6 @@ impl MarkedEventReceiver for YamlLoader {
|
||||||
};
|
};
|
||||||
self.insert_new_node((n, 0));
|
self.insert_new_node((n, 0));
|
||||||
}
|
}
|
||||||
_ => { /* ignore */ }
|
|
||||||
}
|
}
|
||||||
// println!("DOC {:?}", self.doc_stack);
|
// println!("DOC {:?}", self.doc_stack);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue