Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC committed May 25, 2024
1 parent 4cbb002 commit 1a4ca66
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ pub type Result<T> = result::Result<T, Errno>;
/// * `Eq`
/// * Small size
/// * Represents all of the system's errnos, instead of just the most common
/// ones.
/// ones.
pub type Error = Errno;

/// Common trait used to represent file system paths by many Nix functions.
Expand Down
5 changes: 4 additions & 1 deletion src/sched.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ mod sched_linux_like {
let ptr = stack.as_mut_ptr().add(stack.len());
let ptr_aligned = ptr.sub(ptr as usize % 16);
libc::clone(
mem::transmute(
mem::transmute::<
extern "C" fn(*mut Box<dyn FnMut() -> isize>) -> i32,
extern "C" fn(*mut libc::c_void) -> i32,
>(
callback
as extern "C" fn(*mut Box<dyn FnMut() -> isize>) -> i32,
),
Expand Down
2 changes: 1 addition & 1 deletion src/sys/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl Timer {
/// There are 3 types of alarms you can set:
///
/// - one shot: the alarm will trigger once after the specified amount of
/// time.
/// time.
/// Example: I want an alarm to go off in 60s and then disable itself.
///
/// - interval: the alarm will trigger every specified interval of time.
Expand Down
2 changes: 1 addition & 1 deletion src/sys/timerfd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl TimerFd {
/// There are 3 types of alarms you can set:
///
/// - one shot: the alarm will trigger once after the specified amount of
/// time.
/// time.
/// Example: I want an alarm to go off in 60s and then disable itself.
///
/// - interval: the alarm will trigger every specified interval of time.
Expand Down

0 comments on commit 1a4ca66

Please sign in to comment.