Skip to content

Commit

Permalink
Clippy is our friend.
Browse files Browse the repository at this point in the history
  • Loading branch information
Narsil committed Aug 2, 2024
1 parent 837c9cf commit 65f8cf8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bindings/python/src/utils/serde_pyo3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ impl<'a> ser::Serializer for &'a mut Serializer {
fn serialize_struct(self, name: &'static str, _len: usize) -> Result<Self::SerializeStruct> {
// self.serialize_map(Some(len))
// name.serialize(&mut *self)?;
if name.ends_with("Helper") {
self.output += &name[..name.len() - "Helper".len()];
if let Some(stripped) = name.strip_suffix("Helper") {
self.output += stripped;
} else {
self.output += name;
self.output += name
}
self.output += "(";
Ok(self)
Expand Down

0 comments on commit 65f8cf8

Please sign in to comment.