Skip to content

Commit 46594ce

Browse files
robinkrahld-e-s-o
authored andcommitted
Remove unnecessary as_bytes call
This fixes a clippy lint.
1 parent 86e6f16 commit 46594ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ fn value_or_stdin<'s>(ctx: &mut Context<'_>, s: &'s str) -> anyhow::Result<borro
403403
fn ensure_string_lengths(data: &[(&str, &str, usize)]) -> anyhow::Result<()> {
404404
let mut invalid_strings = Vec::new();
405405
for (label, value, max_length) in data {
406-
let length = value.as_bytes().len();
406+
let length = value.len();
407407
if length > *max_length {
408408
invalid_strings.push((label, length, max_length));
409409
}

0 commit comments

Comments
 (0)