Skip to content

Commit 9c09634

Browse files
committed
fat: Do slice after as_bytes
Signed-off-by: Akira Moroo <[email protected]>
1 parent 474849c commit 9c09634

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ impl<'a> Filesystem<'a> {
855855
let mut p = [0_u8; 256];
856856
let mut residual = if !is_absolute_path(path) {
857857
p[0] = b'/';
858-
p[1..1 + len].clone_from_slice(path[..len].as_bytes());
858+
p[1..1 + len].clone_from_slice(&path.as_bytes()[..len]);
859859
core::str::from_utf8(&p).unwrap()
860860
} else {
861861
path

0 commit comments

Comments
 (0)