mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Another batch of command tests (#4496)
* Add a batch of command tests * More tests
This commit is contained in:
@ -290,6 +290,7 @@ impl Value {
|
||||
pub fn as_float(&self) -> Result<f64, ShellError> {
|
||||
match self {
|
||||
Value::Float { val, .. } => Ok(*val),
|
||||
Value::Int { val, .. } => Ok(*val as f64),
|
||||
x => Err(ShellError::CantConvert(
|
||||
"float".into(),
|
||||
x.get_type().to_string(),
|
||||
|
@ -109,8 +109,7 @@ impl Range {
|
||||
self.from <= self.to
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn is_end_inclusive(&self) -> bool {
|
||||
pub fn is_end_inclusive(&self) -> bool {
|
||||
matches!(self.inclusion, RangeInclusion::Inclusive)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user