Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
losynix committed Jun 10, 2024
1 parent 5a940c7 commit 7bc62c2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion usbsas-hid/hid-user/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn open_device(busnum: u8, devnum: u8) -> Result<UsbDevice, rusb::Error> {
Err(_) => return Err(rusb::Error::NotFound),
};

let mut handle = unsafe { libusb_ctx.open_device_with_fd(dev_file.as_raw_fd())? };
let handle = unsafe { libusb_ctx.open_device_with_fd(dev_file.as_raw_fd())? };

for interface in handle.device().active_config_descriptor()?.interfaces() {
for desc in interface.descriptors() {
Expand Down
2 changes: 1 addition & 1 deletion usbsas-mass-storage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl MassStorage {
assert!(rusb::supports_detach_kernel_driver());

let context = rusb::GlobalContext::default();
let mut handle = unsafe { context.open_device_with_fd(file.as_raw_fd())? };
let handle = unsafe { context.open_device_with_fd(file.as_raw_fd())? };
let mut endpoints: [Option<u8>; 2] = [None; 2];
for interface in handle.device().active_config_descriptor()?.interfaces() {
for desc in interface.descriptors() {
Expand Down
2 changes: 1 addition & 1 deletion usbsas-tools/src/fuse-mount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl fuse_mt::FilesystemMT for UsbsasFS {
let mut dir_str = path.to_string_lossy().to_string();

if dir_str == "/" {
dir_str = "".to_owned();
"".clone_into(&mut dir_str);
}

let mut scsi2files = self.scsi2files.write().unwrap();
Expand Down

0 comments on commit 7bc62c2

Please sign in to comment.