Skip to content

Commit

Permalink
Remove unnecessary as_bytes call
Browse files Browse the repository at this point in the history
This fixes a clippy lint.
  • Loading branch information
robinkrahl authored and d-e-s-o committed Jan 15, 2025
1 parent 86e6f16 commit 46594ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ fn value_or_stdin<'s>(ctx: &mut Context<'_>, s: &'s str) -> anyhow::Result<borro
fn ensure_string_lengths(data: &[(&str, &str, usize)]) -> anyhow::Result<()> {
let mut invalid_strings = Vec::new();
for (label, value, max_length) in data {
let length = value.as_bytes().len();
let length = value.len();
if length > *max_length {
invalid_strings.push((label, length, max_length));
}
Expand Down

0 comments on commit 46594ce

Please sign in to comment.