Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
surban committed Dec 6, 2024
1 parent 9d90410 commit a618039
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"rust-analyzer.showUnlinkedFileNotification": false,
"files.exclude": {
"target/": true,
},
Expand Down Expand Up @@ -33,4 +32,6 @@
}
],
"rust-analyzer.cargo.features": "all",
"rust-analyzer.check.command": "clippy",
"rust-analyzer.showUnlinkedFileNotification": false,
}
12 changes: 6 additions & 6 deletions src/function/custom/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1130,13 +1130,13 @@ pub struct CtrlSender<'a> {
custom: &'a mut Custom,
}

impl<'a> fmt::Debug for CtrlSender<'a> {
impl fmt::Debug for CtrlSender<'_> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("CtrlSender").field("ctrl_req", &self.ctrl_req).finish()
}
}

impl<'a> CtrlSender<'a> {
impl CtrlSender<'_> {
/// The control request.
pub const fn ctrl_req(&self) -> &CtrlReq {
&self.ctrl_req
Expand Down Expand Up @@ -1180,7 +1180,7 @@ impl<'a> CtrlSender<'a> {
}
}

impl<'a> Drop for CtrlSender<'a> {
impl Drop for CtrlSender<'_> {
fn drop(&mut self) {
if self.custom.setup_event.is_some() {
let _ = self.do_halt();
Expand All @@ -1196,13 +1196,13 @@ pub struct CtrlReceiver<'a> {
custom: &'a mut Custom,
}

impl<'a> fmt::Debug for CtrlReceiver<'a> {
impl fmt::Debug for CtrlReceiver<'_> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("CtrlReceiver").field("ctrl_req", &self.ctrl_req).finish()
}
}

impl<'a> CtrlReceiver<'a> {
impl CtrlReceiver<'_> {
/// The control request.
pub const fn ctrl_req(&self) -> &CtrlReq {
&self.ctrl_req
Expand Down Expand Up @@ -1253,7 +1253,7 @@ impl<'a> CtrlReceiver<'a> {
}
}

impl<'a> Drop for CtrlReceiver<'a> {
impl Drop for CtrlReceiver<'_> {
fn drop(&mut self) {
if self.custom.setup_event.is_some() {
let _ = self.do_halt();
Expand Down
2 changes: 1 addition & 1 deletion src/function/video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl UvcFrame {
}

fn path(&self) -> PathBuf {
self.format.group_path().join(&self.dir_name())
self.format.group_path().join(self.dir_name())
}

/// Create a new UVC frame with the specified properties.
Expand Down

0 comments on commit a618039

Please sign in to comment.