Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
MEhrn00 committed Jan 28, 2024
1 parent d06fa68 commit b413026
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/guid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ mod tests {
use super::*;
#[test]
fn to_string() {
const TEST_GUID_STRING: &'static str = "12345678-1234-1234-1122-334455667788";
const TEST_GUID_STRING: &str = "12345678-1234-1234-1122-334455667788";

let guid = GUID::from_values(
0x12345678,
Expand Down
12 changes: 6 additions & 6 deletions src/interfaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,23 +400,23 @@ mod tests {
interface_guid,
TEST_GUID,
"Expected GUID value of '{}' did not match found GUID value of '{}'",
test_guid_ref.to_string(),
interface_guid.to_string()
test_guid_ref,
interface_guid
);
}

/// Checks for a correct interface description
#[test]
fn correct_interface_description() {
const TEST_DESCRIPTION: &'static str = "testing testing";
const TEST_DESCRIPTION: &str = "testing testing";

let test_description_os_string = OsString::from(TEST_DESCRIPTION);
let test_description_bytes = test_description_os_string
.encode_wide()
.collect::<Vec<u16>>();

let mut interface_description = [0u16; 256];
(&mut interface_description[..test_description_bytes.len()]).copy_from_slice(
interface_description[..test_description_bytes.len()].copy_from_slice(
&test_description_os_string
.encode_wide()
.collect::<Vec<u16>>(),
Expand Down Expand Up @@ -449,8 +449,8 @@ mod tests {
test_description_os_string,
found_description,
"Expected interface description of '{}' did not match found interface description of '{}'",
test_description_os_string.to_string_lossy().to_string(),
found_description.to_string_lossy().to_string()
test_description_os_string.to_string_lossy(),
found_description.to_string_lossy()
);
}
}
2 changes: 1 addition & 1 deletion src/profiles/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl<'interfaces, 'handle: 'interfaces> WlanInterfaceProfiles<'interfaces, 'hand
'interfaces: 'profiles,
{
WlanInterfaceProfilesIterator {
interface: &self.interface,
interface: self.interface,
item_count: self.len(),
index: 0,
profiles_list_ptr: self.profile_list_ptr,
Expand Down

0 comments on commit b413026

Please sign in to comment.