Skip to content

Commit

Permalink
Remove unnecessary length check
Browse files Browse the repository at this point in the history
  • Loading branch information
sgwilym committed Jul 12, 2024
1 parent 4ede526 commit bfde231
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions data-model/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,7 @@ impl<const MCL: usize, const MCC: usize, const MPL: usize> Encoder for PathRc<MC
for component in self.components() {
encode_max_power(component.len(), MCL, consumer).await?;

if component.len() > 0 {
consumer.bulk_consume_full_slice(component.as_ref()).await?;
}
consumer.bulk_consume_full_slice(component.as_ref()).await?;
}

Ok(())
Expand Down

0 comments on commit bfde231

Please sign in to comment.