Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rmja committed Dec 19, 2023
1 parent 829d4e2 commit c401b51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion atat_derive/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub fn add_type_parameter_bound(
let where_type = syn::PredicateType {
bounded_ty: parse_quote!(#ident),
colon_token: <syn::Token![:]>::default(),
bounds: vec![trait_bound].iter().cloned().collect(),
bounds: [trait_bound].iter().cloned().collect(),
lifetimes: None,
};
generics
Expand Down
14 changes: 6 additions & 8 deletions serde_at/src/de/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,14 @@ impl<'a> Deserializer<'a> {
if self.is_trailing_parsing {
self.index = self.slice.len();
return Ok(&self.slice[start..]);
} else {
if let Some(c) = self.peek() {
if (c as char).is_alphanumeric() || (c as char).is_whitespace() {
self.eat_char();
} else {
return Err(Error::EofWhileParsingString);
}
} else if let Some(c) = self.peek() {
if (c as char).is_alphanumeric() || (c as char).is_whitespace() {
self.eat_char();
} else {
return Ok(&self.slice[start..self.index]);
return Err(Error::EofWhileParsingString);
}
} else {
return Ok(&self.slice[start..self.index]);
}
}
}
Expand Down

0 comments on commit c401b51

Please sign in to comment.