aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/history.rs
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2021-04-06 10:59:07 +0000
committerGitHub <noreply@github.com>2021-04-06 10:59:07 +0000
commitb5845bc3a1e9869389414f13a6dee2acd8cb0c2c (patch)
treebc3a7f173b32098b0c1c90fe0d5849b210e1f1e7 /src/command/history.rs
parentBump serde_derive from 1.0.124 to 1.0.125 (#25) (diff)
downloadatuin-b5845bc3a1e9869389414f13a6dee2acd8cb0c2c.zip
Bump rusqlite from 0.24.2 to 0.25.0 (#30)
* Bump rusqlite from 0.24.2 to 0.25.0 Bumps [rusqlite](https://github.com/rusqlite/rusqlite) from 0.24.2 to 0.25.0. - [Release notes](https://github.com/rusqlite/rusqlite/releases) - [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md) - [Commits](https://github.com/rusqlite/rusqlite/compare/v0.24.2...v0.25.0) Signed-off-by: dependabot[bot] <support@github.com> * Fixes for new rusqlite (mostly the new Params trait) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ellie Huxtable <e@elm.sh>
Diffstat (limited to '')
-rw-r--r--src/command/history.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/command/history.rs b/src/command/history.rs
index af8aef7d..05aed4b9 100644
--- a/src/command/history.rs
+++ b/src/command/history.rs
@@ -3,7 +3,7 @@ use std::env;
use eyre::Result;
use structopt::StructOpt;
-use crate::local::database::{Database, QueryParam};
+use crate::local::database::Database;
use crate::local::history::History;
#[derive(StructOpt)]
@@ -96,12 +96,11 @@ impl Cmd {
let history = match params {
(false, false) => db.list()?,
- (true, false) => db.query(QUERY_SESSION, &[QueryParam::Text(session)])?,
- (false, true) => db.query(QUERY_DIR, &[QueryParam::Text(cwd)])?,
- (true, true) => db.query(
- QUERY_SESSION_DIR,
- &[QueryParam::Text(cwd), QueryParam::Text(session)],
- )?,
+ (true, false) => db.query(QUERY_SESSION, &[session.as_str()])?,
+ (false, true) => db.query(QUERY_DIR, &[cwd.as_str()])?,
+ (true, true) => {
+ db.query(QUERY_SESSION_DIR, &[cwd.as_str(), session.as_str()])?
+ }
};
print_list(&history);