Fix compilation for nu_protocol::value::from_value on 32-bit targets (#13169)

# Description

Needed to cast `usize::MAX` to `i64` for it to compile properly

cc @cptpiepmatz
This commit is contained in:
Devyn Cairns 2024-06-18 05:16:08 -07:00 committed by GitHub
parent b79a2255d2
commit 97876fb0b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -301,7 +301,7 @@ impl_from_value_for_uint!(u64, i64::MAX); // u64::Max would be -1 as i64
#[cfg(target_pointer_width = "64")]
impl_from_value_for_uint!(usize, i64::MAX);
#[cfg(target_pointer_width = "32")]
impl_from_value_for_uint!(usize, usize::MAX);
impl_from_value_for_uint!(usize, usize::MAX as i64);
impl FromValue for () {
fn from_value(v: Value) -> Result<Self, ShellError> {