Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade clap and clap_complete version #154

Merged
merged 7 commits into from Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
66 changes: 41 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Expand Up @@ -19,7 +19,7 @@ exclude = ["/assets"]

[dependencies]
tokio = { version = "1.19.2", features = ["macros", "rt-multi-thread", "time", "sync"] }
clap = "3.2.22"
clap = "4.1.10"
chrono = "0.4.22"
chrono-tz= "0.6.3"
gluesql = { version ="0.13.1", default-features = false, features = ["memory-storage"] }
Expand All @@ -32,7 +32,7 @@ serde = "1.0.144"
reqwest = { version = "0.11", features = ["json"] }
colored = "2"
bincode = { version = "2.0.0-rc.1", features = ["alloc"]}
clap_complete = "3.2.2"
clap_complete = "4.1.5"
rustyline = "11.0.0"

[[bin]]
Expand Down
17 changes: 17 additions & 0 deletions src/command/action.rs
@@ -1,3 +1,5 @@
use clap::builder::Str;

use crate::{
command::application::{CLEAR, CREATE, DELETE, EXIT, HISTORY, LIST, LS, Q, QUEUE, TEST},
error::ParseError,
Expand Down Expand Up @@ -47,3 +49,18 @@ impl From<ActionType> for String {
}
}
}

impl From<ActionType> for Str {
fn from(action: ActionType) -> Self {
TheRustyPickle marked this conversation as resolved.
Show resolved Hide resolved
match action {
ActionType::Create => CREATE.into(),
ActionType::Queue => QUEUE.into(),
ActionType::Delete => DELETE.into(),
ActionType::List => LIST.into(),
ActionType::Test => TEST.into(),
ActionType::Exit => EXIT.into(),
ActionType::Clear => CLEAR.into(),
ActionType::History => HISTORY.into(),
}
}
}