From 8cf1549a87c984337eb013a67e8e211cfe18cd24 Mon Sep 17 00:00:00 2001 From: "Carpenter, Adam (CORP)" Date: Thu, 9 Dec 2021 11:56:49 -0500 Subject: chore: cleanup, remove commented code, naming --- angelsharkd/src/routes/extensions/simple_search/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'angelsharkd/src/routes/extensions/simple_search/mod.rs') diff --git a/angelsharkd/src/routes/extensions/simple_search/mod.rs b/angelsharkd/src/routes/extensions/simple_search/mod.rs index 5b5dc8e..350edc8 100644 --- a/angelsharkd/src/routes/extensions/simple_search/mod.rs +++ b/angelsharkd/src/routes/extensions/simple_search/mod.rs @@ -21,7 +21,7 @@ pub fn search_filter( .and(post()) .and(content_length_limit(1024 * 16)) .and(json()) - .and_then(move |terms: Needles| search(haystack.to_owned(), terms)) + .and_then(move |needles: Needles| search(haystack.to_owned(), needles)) .with(with::header(header::PRAGMA, "no-cache")) .with(with::header(header::CACHE_CONTROL, "no-store, max-age=0")) .with(with::header(header::X_FRAME_OPTIONS, "DENY")) @@ -39,8 +39,6 @@ pub fn refresh_filter( /// Runs the search request to find all needles in the haystack and converts the /// results into a reply. async fn search(haystack: Haystack, needles: Needles) -> Result { - // Ok(haystack.search(Vec::new())?) - // if let Ok(matches = haystack.search(needle); match haystack.search(needles) { Ok(matches) => Ok(reply::with_status(reply::json(&matches), StatusCode::OK)), Err(e) => Ok(reply::with_status( -- cgit v1.2.3