fix typo and clippy
This commit is contained in:
parent
043b1ab955
commit
f03a97d932
|
@ -191,8 +191,8 @@ fn get_initial_state(
|
||||||
match initial {
|
match initial {
|
||||||
Some(v) => Ok(v),
|
Some(v) => Ok(v),
|
||||||
None => {
|
None => {
|
||||||
// the initial state shold be referred from signature
|
// the initial state should be referred from signature
|
||||||
if signature.optional_positional.len() > 0
|
if !signature.optional_positional.is_empty()
|
||||||
&& signature.optional_positional[0].default_value.is_some()
|
&& signature.optional_positional[0].default_value.is_some()
|
||||||
{
|
{
|
||||||
Ok(signature.optional_positional[0]
|
Ok(signature.optional_positional[0]
|
||||||
|
@ -202,7 +202,7 @@ fn get_initial_state(
|
||||||
} else {
|
} else {
|
||||||
Err(ShellError::GenericError {
|
Err(ShellError::GenericError {
|
||||||
error: "The initial value is missing".to_string(),
|
error: "The initial value is missing".to_string(),
|
||||||
msg: "Missing intial value".to_string(),
|
msg: "Missing initial value".to_string(),
|
||||||
span: Some(span),
|
span: Some(span),
|
||||||
help: Some(
|
help: Some(
|
||||||
"Providing <initial> value to generate, or assigning default value to closure parameter"
|
"Providing <initial> value to generate, or assigning default value to closure parameter"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user