Code style refinements.
This commit is contained in:
@@ -745,7 +745,7 @@ mod array_functions {
|
||||
len as usize
|
||||
};
|
||||
|
||||
let mut drained = array.drain(..start).collect::<Array>();
|
||||
let mut drained: Array = array.drain(..start).collect();
|
||||
drained.extend(array.drain(len..));
|
||||
|
||||
drained
|
||||
|
@@ -110,7 +110,7 @@ mod string_functions {
|
||||
pub fn index_of_char_starting_from(string: &str, character: char, start: INT) -> INT {
|
||||
let start = if start < 0 {
|
||||
if let Some(n) = start.checked_abs() {
|
||||
let chars = string.chars().collect::<Vec<_>>();
|
||||
let chars: Vec<_> = string.chars().collect();
|
||||
let num_chars = chars.len();
|
||||
if n as usize > num_chars {
|
||||
0
|
||||
|
Reference in New Issue
Block a user