From 4f4e3ca2178c3d314f9f2dbebc1e1adfdc37abe3 Mon Sep 17 00:00:00 2001 From: Armin Friedl Date: Thu, 18 Nov 2021 21:48:48 +0100 Subject: [PATCH] Move `roftl` to `core` --- src/core/mod.rs | 4 ++++ src/{ => core}/roftl.rs | 6 +++--- src/main.rs | 7 +++---- 3 files changed, 10 insertions(+), 7 deletions(-) rename src/{ => core}/roftl.rs (98%) diff --git a/src/core/mod.rs b/src/core/mod.rs index eec3c89..05fb2ce 100644 --- a/src/core/mod.rs +++ b/src/core/mod.rs @@ -1 +1,5 @@ pub mod shared; +pub mod roftl; + +use super::matcher; +use super::sources; diff --git a/src/roftl.rs b/src/core/roftl.rs similarity index 98% rename from src/roftl.rs rename to src/core/roftl.rs index 621f478..c1c2202 100644 --- a/src/roftl.rs +++ b/src/core/roftl.rs @@ -5,9 +5,9 @@ use rayon::prelude::*; use super::matcher::PrefixMatcher; -use super::core::shared::Matcher; -use super::core::shared::Source; -use super::core::shared::Entry; +use super::shared::Matcher; +use super::shared::Source; +use super::shared::Entry; pub type SourceRef = Box; diff --git a/src/main.rs b/src/main.rs index 968724e..c164998 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,19 +8,18 @@ use winit::event::{ElementState, Event, KeyboardInput, VirtualKeyCode, use crate::matcher::{FuseMatcher, PrefixMatcher}; -mod roftl; +use self::core::roftl::Roftl; + mod ui; mod sources; mod matcher; mod core; -use roftl::Roftl; - fn main() -> Result<(), Box> { env_logger::init(); debug!{"Set up roftl"}; - let mut roftl = roftl::Roftl::new() + let mut roftl = Roftl::new() .add_source(sources::TestSource::new("ts1")) .add_source(sources::Apps::new()) .add_source(sources::ShellHost::new())