Speed up method calls.

This commit is contained in:
Stephen Chung
2022-06-08 16:34:56 +08:00
parent f4ebaa7abf
commit bbaad8dfcb
4 changed files with 91 additions and 41 deletions

View File

@@ -46,7 +46,7 @@ pub fn calc_index<E>(
length: usize,
start: crate::INT,
negative_count_from_end: bool,
err: impl Fn() -> Result<usize, E>,
err: impl FnOnce() -> Result<usize, E>,
) -> Result<usize, E> {
if start < 0 {
if negative_count_from_end {