summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorSam Tay <sam.chong.tay@gmail.com>2020-06-23 23:07:35 -0700
committerSam Tay <sam.chong.tay@gmail.com>2020-06-24 01:35:50 -0700
commit9d1e601554a982c2932e2161b153104d4cc14424 (patch)
tree0e27ef0ad56a2760f0d7f87e02027505b32dd8a3 /src/main.rs
parent74bda95681c253eea5010417dc74e8569010f7f9 (diff)
Reorganize code
The StackExchange struct was getting really bloated. This separates it into smaller modules and structs.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index afd6c21..ac176fc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -12,7 +12,7 @@ use crossterm::style::Color;
use error::{Error, Result};
use lazy_static::lazy_static;
use minimad::mad_inline;
-use stackexchange::{LocalStorage, StackExchange};
+use stackexchange::{LocalStorage, Search};
use term::mk_print_error;
use termimad::{CompoundStyle, MadSkin};
use tokio::runtime::Runtime;
@@ -82,7 +82,7 @@ async fn run(skin: &mut MadSkin) -> Result<Option<Vec<Question<Markdown>>>> {
}
if let Some(q) = opts.query {
- let mut se = StackExchange::new(config, ls, q);
+ let mut se = Search::new(config, ls, q);
if lucky {
let md = se.search_lucky().await?;
skin.print_text(&md);