Run cargo fmt --all

This commit is contained in:
2025-08-25 20:03:21 -03:00
parent e5fe77c287
commit 676fdcfd96
6 changed files with 35 additions and 19 deletions
+8 -4
View File
@@ -102,16 +102,20 @@ pub fn u64_to_i64(u: u64) -> i64 {
}
/// Splits at the `n`th occurrence of `pattern` counting from the end of the string.
///
///
/// Arguments:
/// * `s` - The string to split.
/// * `pattern` - The pattern to split at.
/// * `n` - The occurrence to split at (counting from the end).
///
///
/// Returns:
/// [`Option<(&str, &str)>`] - The splitted parts of the string, or [`None`] if no occurrences of
/// `pattern` were found in `s`.
pub fn split_at_nth_from_end<'a, 'b>(s: &'a str, pattern: &'b str, n: usize) -> Option<(&'a str, &'a str)> {
pub fn split_at_nth_from_end<'a, 'b>(
s: &'a str,
pattern: &'b str,
n: usize,
) -> Option<(&'a str, &'a str)> {
let mut end = s.len();
let mut count = 0;
@@ -128,4 +132,4 @@ pub fn split_at_nth_from_end<'a, 'b>(s: &'a str, pattern: &'b str, n: usize) ->
}
None
}
}