Coverage Report

Created: 2024-02-20 21:15

/builds/xfbs/cindy/src/command/query.rs
Line
Count
Source (jump to first uncovered line)
1
use crate::{cli::QueryCommand, Cindy};
2
use anyhow::Result;
3
4
impl Cindy {
5
1
    pub async fn command_query(&self, command: &QueryCommand) -> Result<()> {
6
1
        let database = self.database().
await0
;
7
1
        let command = command.clone();
8
1
        tokio::task::spawn_blocking(move || {
9
1
            let hashes = database.query_hashes(&mut command.filters.iter())
?0
;
10
2
            for 
hash1
in &hashes {
11
1
                println!("{hash}");
12
1
            }
13
1
            Ok(()) as Result<()>
14
1
        })
15
1
        .await
?0
?0
;
16
1
        Ok(())
17
1
    }
18
}