Add hooks to cli/repl (#5479)

* Add hooks to cli/repl

* Clippy

* Clippy
This commit is contained in:
JT
2022-05-09 07:28:39 +12:00
committed by GitHub
parent a61d09222f
commit 3a35bf7d4e
6 changed files with 134 additions and 5 deletions

View File

@ -411,9 +411,9 @@ mod test {
#[test]
fn test_order_paths() {
fn sort<'a>(paths: &'a Vec<&'a str>, abbr: &str) -> Vec<&'a str> {
fn sort<'a>(paths: &'a [&'a str], abbr: &str) -> Vec<&'a str> {
let abbr = Abbr::new_sanitized(abbr);
let mut paths = paths.clone();
let mut paths = paths.to_owned();
paths.sort_by_key(|path| abbr.compare(path).unwrap());
paths