Skip to content

Commit

Permalink
Clippy: Ignore some new lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Serial-ATA committed Sep 5, 2023
1 parent 5ddbdcb commit b66e2f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ebml/element_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ macro_rules! define_master_elements {

define_master_elements! {
EBML: {
id: 0x1A45DFA3,
id: 0x1A45_DFA3,
children: [
EBMLVersion: { 0x4286, UnsignedInt },
EBMLReadVersion: { 0x42F7, UnsignedInt },
Expand Down Expand Up @@ -213,7 +213,7 @@ where
pub(crate) fn read_float(&mut self, element_length: u64) -> Result<f64> {
Ok(match element_length {
0 => 0.0,
4 => self.reader.read_f32::<BigEndian>()? as f64,
4 => f64::from(self.reader.read_f32::<BigEndian>()?),
8 => self.reader.read_f64::<BigEndian>()?,
_ => decode_err!(@BAIL Ebml, "Invalid size for float element"),
})
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@
clippy::from_iter_instead_of_collect,
clippy::no_effect_underscore_binding,
clippy::used_underscore_binding,
clippy::needless_return,
clippy::ignored_unit_patterns,
clippy::redundant_guards,
)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

Expand Down

0 comments on commit b66e2f5

Please sign in to comment.