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 13154ab commit f670375
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 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/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ impl FunctionDir {
/// Create a subdirectory and its parent directories.
pub fn create_dir_all(&self, name: impl AsRef<Path>) -> Result<()> {
let path = self.property_path(name)?;
log::debug!("creating directorys {}", path.display());
log::debug!("creating directories {}", path.display());
fs::create_dir_all(path)
}

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 f670375

Please sign in to comment.