Skip to content

Commit 57d7207

Browse files
committed
fix rlimit conversion
1 parent faa58fa commit 57d7207

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/config.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ impl Config {
6363
let max_concurrent_checks =
6464
match rlimit::increase_nofile_limit(u64::MAX) {
6565
Ok(lim) => {
66-
#[cfg(target_pointer_width = "32")]
67-
let lim = cast::usize(lim).unwrap_or(usize::MAX);
68-
#[cfg(not(target_pointer_width = "32"))]
69-
let lim = cast::usize(lim);
66+
let lim = usize::try_from(lim).unwrap_or(usize::MAX);
7067

7168
if raw_config.max_concurrent_checks > lim {
7269
log::warn!(

0 commit comments

Comments
 (0)