diff --git a/lychee-lib/src/extract/html/srcset.rs b/lychee-lib/src/extract/html/srcset.rs index bb5ef3907b..0f728ecc78 100644 --- a/lychee-lib/src/extract/html/srcset.rs +++ b/lychee-lib/src/extract/html/srcset.rs @@ -35,7 +35,7 @@ where { for (i, ch) in input.char_indices() { if !predicate(&ch) { - return (&input[0..i], &input[i..]); + return input.split_at(i); } } (input, "")