Skip to content

Commit 8112f74

Browse files
committed
v0: replace [0] index access via iterator's next()
1 parent 608c1eb commit 8112f74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/v0.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ pub fn demangle(s: &str) -> Result<(Demangle<'_>, &str), Invalid> {
4141
};
4242

4343
// Paths always start with uppercase characters.
44-
match inner.as_bytes()[0] {
45-
b'A'..=b'Z' => {}
44+
match inner.bytes().next() {
45+
Some(b'A'..=b'Z') => {}
4646
_ => return Err(Invalid),
4747
}
4848

0 commit comments

Comments
 (0)