Skip to content

Commit bf925b3

Browse files
Use Result instead of Option due to upcoming changes
1 parent e5da0c5 commit bf925b3

File tree

1 file changed

+3
-3
lines changed
  • crates/humanode-peer/src/cli

1 file changed

+3
-3
lines changed

crates/humanode-peer/src/cli/init.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ const RECOMMENDED_OPEN_FILE_DESCRIPTOR_LIMIT: u64 = 10_000;
3838
/// We require a substantial amount of fds for the networking, so raise it, and report if the raised
3939
/// limit is still way too low.
4040
pub fn raise_fd_limit() {
41-
if let Some(new_limit) = fdlimit::raise_fd_limit() {
42-
if new_limit < RECOMMENDED_OPEN_FILE_DESCRIPTOR_LIMIT {
41+
if let Ok(fdlimit::Outcome::LimitRaised { from: _, to }) = fdlimit::raise_fd_limit() {
42+
if to < RECOMMENDED_OPEN_FILE_DESCRIPTOR_LIMIT {
4343
tracing::warn!(
4444
"Low open file descriptor limit configured for the process. \
4545
Current value: {:?}, recommended value: {:?}.",
46-
new_limit,
46+
to,
4747
RECOMMENDED_OPEN_FILE_DESCRIPTOR_LIMIT,
4848
);
4949
}

0 commit comments

Comments
 (0)