diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-10-13 19:31:02 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-10-13 19:35:15 +0200 |
commit | 41ece0c732a52c8256088bb929bc118958fa7954 (patch) | |
tree | 9b1a0be38a87e664ec74062f22c831a630f9ab42 /src/package/tree.rs | |
parent | e852def3bd787f08790793a5046d7e11ce69c55e (diff) |
Remove unnecessary function argument
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/package/tree.rs')
-rw-r--r-- | src/package/tree.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/package/tree.rs b/src/package/tree.rs index 7ec8a77..2ab95e1 100644 --- a/src/package/tree.rs +++ b/src/package/tree.rs @@ -74,11 +74,11 @@ impl Tree { /// If the package is multiple times in the tree, only the first one will be found /// pub fn package_depth(&self, p: &Package) -> Option<usize> { - self.package_depth_of(p, |k| k == p) + self.package_depth_where(|k| k == p) } /// Same as `package_depth()` but with custom compare functionfunction - pub fn package_depth_of<F>(&self, p: &Package, cmp: F) -> Option<usize> + pub fn package_depth_where<F>(&self, cmp: F) -> Option<usize> where F: Fn(&Package) -> bool { fn find_package_depth<F>(tree: &Tree, current: usize, cmp: &F) -> Option<usize> |