From ada70b76716cf24cfd7cc31c1b0373e97e60ac42 Mon Sep 17 00:00:00 2001 From: Magnus Hoff Date: Sun, 17 Sep 2017 15:43:31 +0200 Subject: [PATCH] Cleanup --- src/wiki_lookup.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wiki_lookup.rs b/src/wiki_lookup.rs index 3fd392c..d2a19af 100644 --- a/src/wiki_lookup.rs +++ b/src/wiki_lookup.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use futures::{self, Future}; +use futures::{Future, finished}; use assets::*; use article_resource::ArticleResource; @@ -55,7 +55,7 @@ impl Lookup for WikiLookup { if path.starts_with("/_") { // Reserved namespace - return Box::new(futures::finished( + return Box::new(finished( LOOKUP_MAP.get(path).map(|x| x()) )); } @@ -66,7 +66,7 @@ impl Lookup for WikiLookup { if split.next() != None { // Currently disallow any URLs of the form /slug/... - return Box::new(futures::finished(None)); + return Box::new(finished(None)); } if let Ok(article_id) = slug.parse() { @@ -77,7 +77,7 @@ impl Lookup for WikiLookup { ))) ) } else { - Box::new(futures::finished(None)) + Box::new(finished(None)) } } }