Skip to content

Commit

Permalink
Fix clippy lint warnings.
Browse files Browse the repository at this point in the history
Apparently max_value() is deprecated.

Signed-off-by: Andrew Walbran <[email protected]>
  • Loading branch information
qwandor committed Aug 1, 2024
1 parent 44886c3 commit 79b2ab4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ impl VsockStream {

// https://github.com/rust-lang/libc/issues/1848
#[cfg_attr(target_env = "musl", allow(deprecated))]
let secs = if dur.as_secs() > libc::time_t::max_value() as u64 {
libc::time_t::max_value()
let secs = if dur.as_secs() > libc::time_t::MAX as u64 {
libc::time_t::MAX
} else {
dur.as_secs() as libc::time_t
};
Expand Down

0 comments on commit 79b2ab4

Please sign in to comment.