Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
Signed-off-by: FedericoBruzzone <[email protected]>
  • Loading branch information
FedericoBruzzone committed Apr 14, 2024
1 parent fef2b1a commit 6fac28e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/utf16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fn encode_code_point(unicode_cp: u32) -> Vec<u16> {
/// # Panics
/// * If the index `i` is out of bounds.
/// * If the UTF-16 code point is invalid.
fn decode_symbol(utf16_cp: &Vec<u16>, i: usize) -> Option<(u32, usize)> {
fn decode_symbol(utf16_cp: &[u16], i: usize) -> Option<(u32, usize)> {
if i > utf16_cp.len() {
panic!("Index out of bounds");
}
Expand Down
2 changes: 1 addition & 1 deletion src/utf8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ fn encode_code_point(unicode_cp: u32) -> Vec<u8> {
/// # Panics
/// * If the index `i` is out of bounds.
/// * If the byte at index `i` is not a continuation byte.
fn read_next_byte(byte_vec: &Vec<u8>, i: usize) -> u32 {
fn read_next_byte(byte_vec: &[u8], i: usize) -> u32 {
if i >= byte_vec.len() {
panic!("Index out of bounds");
}
Expand Down

0 comments on commit 6fac28e

Please sign in to comment.