diff --git a/src/common/commands_parser.rs b/src/common/commands_parser.rs index 0da9a7a1b..780091964 100644 --- a/src/common/commands_parser.rs +++ b/src/common/commands_parser.rs @@ -403,7 +403,7 @@ fn parse_enclave_cid(args: &ArgMatches) -> NitroCliResult> { )); } - if enclave_cid == u32::max_value() as u64 { + if enclave_cid == u32::MAX as u64 { return Err(new_nitro_cli_failure!( &format!( "CID {} is a well-known CID, not to be used for enclaves", @@ -425,7 +425,7 @@ fn parse_enclave_cid(args: &ArgMatches) -> NitroCliResult> { } // 64-bit CIDs are not yet supported for the vsock device. - if enclave_cid > u32::max_value() as u64 { + if enclave_cid > u32::MAX as u64 { return Err(new_nitro_cli_failure!( &format!( "CID {} is higher than the maximum supported (u32 max) for a vsock device", diff --git a/src/utils.rs b/src/utils.rs index bc368f5c1..7fef629d6 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -321,7 +321,7 @@ fn vsock_set_connect_timeout(fd: RawFd, millis: i64) -> NitroCliResult<()> { /// limit of enclave memory based on the EIF file size. pub fn ceil_div(lhs: u64, rhs: u64) -> u64 { if rhs == 0 { - return std::u64::MAX; + return u64::MAX; } lhs / rhs