mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-10 20:12:25 +01:00
fixed clippy errors
This commit is contained in:
parent
f47cd173be
commit
3357bd5947
2 changed files with 3 additions and 4 deletions
|
@ -19,9 +19,8 @@ impl CommandEnum {
|
|||
let rename = attrs.rename;
|
||||
let separator = attrs.separator;
|
||||
let mut parser = attrs.parser.unwrap_or(ParserType::Default);
|
||||
match (&mut parser, &separator) {
|
||||
(ParserType::Split { separator }, Some(s)) => *separator = Some(s.clone()),
|
||||
_ => {}
|
||||
if let (ParserType::Split { separator }, Some(s)) = (&mut parser, &separator) {
|
||||
*separator = Some(s.clone())
|
||||
}
|
||||
if let Some(rename_rule) = &rename {
|
||||
match rename_rule.as_str() {
|
||||
|
|
|
@ -79,7 +79,7 @@ fn create_parser<'a>(
|
|||
_ => quote! { compile_error!("Expected 1 argument") },
|
||||
},
|
||||
ParserType::Split { separator } => parser_with_separator(
|
||||
&separator.clone().unwrap_or(" ".to_owned()),
|
||||
&separator.clone().unwrap_or_else(|| " ".to_owned()),
|
||||
types,
|
||||
count_args,
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue