mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 03:58:03 +02:00
Use int
type name consistently (#10579)
# Description When referring to the type use `int` consistently. Only when referring to the concept of integer numbers use `integer`. - Fix `random integer` to `random int` tests - Forgot in #10520 - Use int instead of integer in error messages - Use int type name in bits commands - Fix messages in `for` examples - Use int typename in `into` commands - Use int typename in rest of commands - Report errors in `nu-protocol` with int typename Work for #10332 # User-Facing Changes User errorrs should now use `int` so you can easily find the necessary commands or type annotations. # Tests + Formatting Only two tests found that needed updating
This commit is contained in:
committed by
GitHub
parent
2cc4191ec9
commit
7c1487e18d
@ -288,7 +288,7 @@ pub fn request_set_timeout(
|
||||
let val = timeout.as_i64()?;
|
||||
if val.is_negative() || val < 1 {
|
||||
return Err(ShellError::TypeMismatch {
|
||||
err_message: "Timeout value must be an integer and larger than 0".to_string(),
|
||||
err_message: "Timeout value must be an int and larger than 0".to_string(),
|
||||
span: timeout.span(),
|
||||
});
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ impl UrlComponents {
|
||||
}),
|
||||
Err(_) => Err(ShellError::IncompatibleParametersSingle {
|
||||
msg: String::from(
|
||||
"Port parameter should represent an unsigned integer",
|
||||
"Port parameter should represent an unsigned int",
|
||||
),
|
||||
span: value_span,
|
||||
}),
|
||||
@ -172,7 +172,7 @@ impl UrlComponents {
|
||||
Value::Error { error, .. } => Err(*error),
|
||||
other => Err(ShellError::IncompatibleParametersSingle {
|
||||
msg: String::from(
|
||||
"Port parameter should be an unsigned integer or a string representing it",
|
||||
"Port parameter should be an unsigned int or a string representing it",
|
||||
),
|
||||
span: other.span(),
|
||||
}),
|
||||
|
Reference in New Issue
Block a user