Skip to content

Commit 72bc1fe

Browse files
evilpiekjarosh
authored andcommitted
fix clippy warnings
1 parent a5e938d commit 72bc1fe

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

flash-lso/src/amf0/writer/array_writer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub struct ArrayWriter<'a, 'b> {
1313
pub(crate) parent: &'a mut dyn ObjWriter<'b>,
1414
}
1515

16-
impl<'a, 'b> ObjWriter<'a> for ArrayWriter<'a, 'b> {
16+
impl<'a> ObjWriter<'a> for ArrayWriter<'a, '_> {
1717
fn add_element(&mut self, name: &str, s: Value, inc_ref: bool) {
1818
if inc_ref {
1919
self.make_reference();
@@ -90,7 +90,7 @@ impl<'a, 'b> ObjWriter<'a> for ArrayWriter<'a, 'b> {
9090
}
9191
}
9292

93-
impl<'a, 'b> ArrayWriter<'a, 'b> {
93+
impl ArrayWriter<'_, '_> {
9494
/// Finalize this array, adding it to it's parent
9595
/// If this is not called, the array will not be added
9696
pub fn commit<T: AsRef<str>>(self, name: T, length: u32) {

flash-lso/src/amf0/writer/object_writer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub struct ObjectWriter<'a, 'b> {
1313
pub(crate) parent: &'a mut dyn ObjWriter<'b>,
1414
}
1515

16-
impl<'a, 'b> ObjWriter<'a> for ObjectWriter<'a, 'b> {
16+
impl<'a> ObjWriter<'a> for ObjectWriter<'a, '_> {
1717
fn add_element(&mut self, name: &str, s: Value, inc_ref: bool) {
1818
if inc_ref {
1919
self.parent.make_reference();
@@ -89,7 +89,7 @@ impl<'a, 'b> ObjWriter<'a> for ObjectWriter<'a, 'b> {
8989
}
9090
}
9191

92-
impl<'a, 'b> ObjectWriter<'a, 'b> {
92+
impl ObjectWriter<'_, '_> {
9393
/// Finalize this object, adding it to it's parent
9494
/// If this is not called, the object will not be added
9595
pub fn commit<T: AsRef<str>>(self, name: T) {

flash-lso/src/errors.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use thiserror::Error;
33

44
// Allow the Nom variant to be large
55
#[allow(variant_size_differences)]
6-
76
/// Enum for representing decoding errors
87
#[derive(Error, Debug, Clone, Eq, PartialEq)]
98
pub enum Error<'a> {

flash-lso/tests/integration_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use std::ops::Deref;
1717
pub struct PrettyArray<'a>(pub &'a Vec<u8>);
1818

1919
/// Make diff to display string as single-line string
20-
impl<'a> fmt::Debug for PrettyArray<'a> {
20+
impl fmt::Debug for PrettyArray<'_> {
2121
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2222
f.write_str(&format!("{:?}", self.0))
2323
}

web/src/component_treenode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ impl TreeNode {
198198

199199
pub fn selected(&self, ctx: &Context<Self>) -> bool {
200200
let selected_path = ctx.props().selection.clone().map(|s| s.path);
201-
selected_path.map_or(false, |tnp| tnp.contains(self.path(ctx)))
201+
selected_path.is_some_and(|tnp| tnp.contains(self.path(ctx)))
202202
}
203203

204204
pub fn has_children(data: &Value) -> bool {

0 commit comments

Comments
 (0)