diff options
author | Sam Tay <sam.chong.tay@gmail.com> | 2020-06-18 14:50:02 -0700 |
---|---|---|
committer | Sam Tay <sam.chong.tay@gmail.com> | 2020-06-18 14:50:02 -0700 |
commit | 412676f8c99a93ee879c9c127a58b32dae50cdfa (patch) | |
tree | ccf7316192626c3c7929973d9d64cbef042657d9 /src/main.rs | |
parent | 5f88657a75c4443ba93936e0f14bb3be0435fd41 (diff) |
Allow searching multiple SE sites at once
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index e7c0414..c900765 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,7 +36,7 @@ async fn main() -> Result<(), Error> { async fn run(skin: &mut MadSkin) -> Result<(), Error> { let opts = cli::get_opts()?; let config = opts.config; - let site = &config.site; + let sites = &config.sites; let lucky = config.lucky; let mut ls = LocalStorage::new()?; @@ -62,7 +62,7 @@ async fn run(skin: &mut MadSkin) -> Result<(), Error> { return Ok(()); } - if !ls.validate_site(site).await? { + if let Some(site) = ls.find_invalid_site(sites).await? { print_error!(skin, "$0 is not a valid StackExchange site.\n\n", site)?; // TODO should only use inline for single lines; use termimad::text stuff print_notice!( |