forked from extern/nushell
Merge branch 'nushell:main' into main
This commit is contained in:
@ -160,8 +160,8 @@ pub fn action(input: Value, span: Span) -> Value {
|
||||
}
|
||||
}
|
||||
fn int_from_string(a_string: &str, span: Span) -> Result<i64, ShellError> {
|
||||
match a_string.parse::<i64>() {
|
||||
Ok(n) => Ok(n),
|
||||
match a_string.parse::<bytesize::ByteSize>() {
|
||||
Ok(n) => Ok(n.0 as i64),
|
||||
Err(_) => Err(ShellError::CantConvert("int".into(), span)),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user