Skip to content

Commit

Permalink
Merge pull request #181 from cameleon-rs/fix-clippy-1.75
Browse files Browse the repository at this point in the history
Fix clippy 1.75 warnings
  • Loading branch information
Y-Nak committed Feb 13, 2024
2 parents 1e34b0a + 73b75ba commit abe5558
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions device/src/u3v/async_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ fn poll_completed(
let remaining = deadline.saturating_duration_since(Instant::now());
let timeval = libc::timeval {
tv_sec: remaining.as_secs().try_into().unwrap(),
// tv_usec is i64 on Linux (with infallible conversion from u32), but i32 on Mac.
#[allow(clippy::unnecessary_fallible_conversions)]
tv_usec: remaining.subsec_micros().try_into().unwrap(),
};

Expand Down
2 changes: 1 addition & 1 deletion gentl/src/ffi/port.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ gentl_api! {
let handle = unsafe { ModuleHandle::from_raw_manually_drop(hPort)? };
let url = with_port!(handle, |port| {
// Use first info.
let xml_info = port.xml_infos()?.get(0).ok_or_else(|| GenTlError::Error("no xml information in the device".into()))?;
let xml_info = port.xml_infos()?.first().ok_or_else(|| GenTlError::Error("no xml information in the device".into()))?;
file_location_to_url(xml_info, port.port_info()?)
});

Expand Down

0 comments on commit abe5558

Please sign in to comment.