mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
get rid of structop and update clippy in common test, now only criterion is left with version 2
This commit is contained in:
parent
4be1e82ba9
commit
d90ea8c1da
61
Cargo.lock
generated
61
Cargo.lock
generated
@ -121,15 +121,6 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ansi_term"
|
|
||||||
version = "0.12.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
|
||||||
dependencies = [
|
|
||||||
"winapi 0.3.9",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anstream"
|
name = "anstream"
|
||||||
version = "0.3.2"
|
version = "0.3.2"
|
||||||
@ -739,13 +730,9 @@ version = "2.34.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
|
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term",
|
|
||||||
"atty",
|
|
||||||
"bitflags 1.3.2",
|
"bitflags 1.3.2",
|
||||||
"strsim 0.8.0",
|
|
||||||
"textwrap",
|
"textwrap",
|
||||||
"unicode-width",
|
"unicode-width",
|
||||||
"vec_map",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -778,7 +765,7 @@ version = "4.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4"
|
checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck 0.4.1",
|
"heck",
|
||||||
"proc-macro2 1.0.56",
|
"proc-macro2 1.0.56",
|
||||||
"quote 1.0.26",
|
"quote 1.0.26",
|
||||||
"syn 2.0.15",
|
"syn 2.0.15",
|
||||||
@ -2797,15 +2784,6 @@ dependencies = [
|
|||||||
"stable_deref_trait",
|
"stable_deref_trait",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "heck"
|
|
||||||
version = "0.3.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
|
|
||||||
dependencies = [
|
|
||||||
"unicode-segmentation",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "heck"
|
name = "heck"
|
||||||
version = "0.4.1"
|
version = "0.4.1"
|
||||||
@ -6231,12 +6209,6 @@ version = "1.0.6"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0"
|
checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "strsim"
|
|
||||||
version = "0.8.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "strsim"
|
name = "strsim"
|
||||||
version = "0.9.3"
|
version = "0.9.3"
|
||||||
@ -6249,30 +6221,6 @@ version = "0.10.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "structopt"
|
|
||||||
version = "0.3.26"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10"
|
|
||||||
dependencies = [
|
|
||||||
"clap 2.34.0",
|
|
||||||
"lazy_static",
|
|
||||||
"structopt-derive",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "structopt-derive"
|
|
||||||
version = "0.4.18"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0"
|
|
||||||
dependencies = [
|
|
||||||
"heck 0.3.3",
|
|
||||||
"proc-macro-error",
|
|
||||||
"proc-macro2 1.0.56",
|
|
||||||
"quote 1.0.26",
|
|
||||||
"syn 1.0.109",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "strum"
|
name = "strum"
|
||||||
version = "0.24.1"
|
version = "0.24.1"
|
||||||
@ -6288,7 +6236,7 @@ version = "0.24.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59"
|
checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck 0.4.1",
|
"heck",
|
||||||
"proc-macro2 1.0.56",
|
"proc-macro2 1.0.56",
|
||||||
"quote 1.0.26",
|
"quote 1.0.26",
|
||||||
"rustversion",
|
"rustversion",
|
||||||
@ -6970,7 +6918,6 @@ dependencies = [
|
|||||||
"rustyline",
|
"rustyline",
|
||||||
"serde",
|
"serde",
|
||||||
"specs",
|
"specs",
|
||||||
"structopt",
|
|
||||||
"termcolor",
|
"termcolor",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
@ -7015,7 +6962,7 @@ dependencies = [
|
|||||||
"cfg-if 1.0.0",
|
"cfg-if 1.0.0",
|
||||||
"chrono",
|
"chrono",
|
||||||
"chrono-tz",
|
"chrono-tz",
|
||||||
"clap 2.34.0",
|
"clap 4.2.7",
|
||||||
"criterion",
|
"criterion",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"crossbeam-utils 0.8.15",
|
"crossbeam-utils 0.8.15",
|
||||||
@ -7045,7 +6992,6 @@ dependencies = [
|
|||||||
"slotmap 1.0.6",
|
"slotmap 1.0.6",
|
||||||
"specs",
|
"specs",
|
||||||
"spin_sleep",
|
"spin_sleep",
|
||||||
"structopt",
|
|
||||||
"strum",
|
"strum",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
@ -7361,6 +7307,7 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
"shell-words",
|
"shell-words",
|
||||||
"signal-hook 0.3.15",
|
"signal-hook 0.3.15",
|
||||||
|
"strum",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tui",
|
"tui",
|
||||||
|
@ -7,7 +7,7 @@ edition = "2021"
|
|||||||
[features]
|
[features]
|
||||||
simd = ["vek/platform_intrinsics"]
|
simd = ["vek/platform_intrinsics"]
|
||||||
plugins = ["common-state/plugins"]
|
plugins = ["common-state/plugins"]
|
||||||
bin_bot = ["common-ecs", "serde", "ron", "clap", "structopt", "rustyline", "common-frontend", "async-channel", "voxygen-i18n-helpers", "client-i18n"]
|
bin_bot = ["common-ecs", "serde", "ron", "clap", "rustyline", "common-frontend", "async-channel", "voxygen-i18n-helpers", "client-i18n"]
|
||||||
tracy = ["common-base/tracy"]
|
tracy = ["common-base/tracy"]
|
||||||
tick_network = []
|
tick_network = []
|
||||||
|
|
||||||
@ -41,8 +41,7 @@ voxygen-i18n-helpers = { package = "veloren-voxygen-i18n-helpers", path = "../vo
|
|||||||
client-i18n = { package = "veloren-client-i18n", path = "i18n", optional = true }
|
client-i18n = { package = "veloren-client-i18n", path = "i18n", optional = true }
|
||||||
serde = { version = "1.0", features = [ "rc", "derive" ], optional = true }
|
serde = { version = "1.0", features = [ "rc", "derive" ], optional = true }
|
||||||
ron = { version = "0.8", default-features = false, optional = true }
|
ron = { version = "0.8", default-features = false, optional = true }
|
||||||
clap = { version = "4.2", optional = true, features = ["color", "std"] }
|
clap = { version = "4.2", optional = true }
|
||||||
structopt = { version = "0.3.13", optional = true }
|
|
||||||
rustyline = { version = "11.0.0", optional = true }
|
rustyline = { version = "11.0.0", optional = true }
|
||||||
## logging
|
## logging
|
||||||
termcolor = { version = "1.1", optional = true }
|
termcolor = { version = "1.1", optional = true }
|
||||||
|
@ -21,7 +21,7 @@ hashbrown = { version = "0.13", features = ["serde", "nightly"] }
|
|||||||
deunicode = "1.0"
|
deunicode = "1.0"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
# Bin
|
# Bin
|
||||||
clap = { version = "4.2", features = ["suggestions", "std"], default-features = false, optional = true }
|
clap = { version = "4.2", features = ["suggestions", "std", "help", "usage", "error-context"], default-features = false, optional = true }
|
||||||
fluent-syntax = { git = "https://github.com/juliancoffee/fluent-rs.git", branch = "patched"}
|
fluent-syntax = { git = "https://github.com/juliancoffee/fluent-rs.git", branch = "patched"}
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
|
@ -26,10 +26,13 @@ impl Tui {
|
|||||||
|
|
||||||
let handle = thread::spawn(move || {
|
let handle = thread::spawn(move || {
|
||||||
thread::sleep(Duration::from_millis(20));
|
thread::sleep(Duration::from_millis(20));
|
||||||
let mut readline =
|
let config = rustyline::config::Builder::new()
|
||||||
rustyline::Editor::<(), rustyline::history::FileHistory>::with_history(
|
.max_history_size(1000)
|
||||||
Default::default(),
|
.unwrap()
|
||||||
Default::default(),
|
.build();
|
||||||
|
let mut readline = rustyline::Editor::<(), _>::with_history(
|
||||||
|
config,
|
||||||
|
rustyline::history::MemHistory::with_config(config),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
while let Ok(cmd) = readline.readline("\n\nbotclient> ") {
|
while let Ok(cmd) = readline.readline("\n\nbotclient> ") {
|
||||||
@ -77,7 +80,7 @@ impl Tui {
|
|||||||
Some(("register", matches)) => command_s.try_send(Cmd::Register {
|
Some(("register", matches)) => command_s.try_send(Cmd::Register {
|
||||||
prefix: matches.get_one::<String>("prefix").unwrap().to_string(),
|
prefix: matches.get_one::<String>("prefix").unwrap().to_string(),
|
||||||
password: matches.get_one::<String>("password").unwrap().to_string(),
|
password: matches.get_one::<String>("password").unwrap().to_string(),
|
||||||
count: matches.get_one::<usize>("count").cloned(),
|
count: matches.get_one::<usize>("count").copied(),
|
||||||
}),
|
}),
|
||||||
Some(("login", matches)) => command_s.try_send(Cmd::Login {
|
Some(("login", matches)) => command_s.try_send(Cmd::Login {
|
||||||
prefix: matches.get_one::<String>("prefix").unwrap().to_string(),
|
prefix: matches.get_one::<String>("prefix").unwrap().to_string(),
|
||||||
|
@ -8,8 +8,8 @@ edition = "2021"
|
|||||||
no-assets = []
|
no-assets = []
|
||||||
hot-reloading = ["common-assets/hot-reloading"]
|
hot-reloading = ["common-assets/hot-reloading"]
|
||||||
simd = ["vek/platform_intrinsics"]
|
simd = ["vek/platform_intrinsics"]
|
||||||
bin_csv = ["ron", "csv", "structopt"]
|
bin_csv = ["ron", "csv", "clap"]
|
||||||
bin_graphviz = ["petgraph", "structopt"]
|
bin_graphviz = ["petgraph", "clap"]
|
||||||
bin_cmd_doc_gen = []
|
bin_cmd_doc_gen = []
|
||||||
bin_asset_migrate = ["ron"]
|
bin_asset_migrate = ["ron"]
|
||||||
rrt_pathfinding = ["kiddo"]
|
rrt_pathfinding = ["kiddo"]
|
||||||
@ -40,7 +40,6 @@ strum = { version = "0.24", features = ["derive"] }
|
|||||||
|
|
||||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||||
approx = "0.4.0"
|
approx = "0.4.0"
|
||||||
clap = "2.33"
|
|
||||||
crossbeam-utils = "0.8.1"
|
crossbeam-utils = "0.8.1"
|
||||||
bitflags = "1.2"
|
bitflags = "1.2"
|
||||||
crossbeam-channel = "0.5"
|
crossbeam-channel = "0.5"
|
||||||
@ -67,11 +66,11 @@ serde_repr = "0.1.6"
|
|||||||
ron = { version = "0.7", default-features = false, optional = true }
|
ron = { version = "0.7", default-features = false, optional = true }
|
||||||
# csv export
|
# csv export
|
||||||
csv = { version = "1.1.3", optional = true }
|
csv = { version = "1.1.3", optional = true }
|
||||||
structopt = { version = "0.3.13", optional = true }
|
|
||||||
# graphviz exporters
|
# graphviz exporters
|
||||||
petgraph = { version = "0.6", optional = true }
|
petgraph = { version = "0.6", optional = true }
|
||||||
# K-d trees used for RRT pathfinding
|
# K-d trees used for RRT pathfinding
|
||||||
kiddo = { version = "0.2", optional = true }
|
kiddo = { version = "0.2", optional = true }
|
||||||
|
clap = { version = "4.2", optional = true }
|
||||||
|
|
||||||
# Data structures
|
# Data structures
|
||||||
hashbrown = { version = "0.13", features = ["rayon", "serde", "nightly"] }
|
hashbrown = { version = "0.13", features = ["rayon", "serde", "nightly"] }
|
||||||
@ -91,7 +90,6 @@ rand_chacha = "0.3"
|
|||||||
tracing-subscriber = { version = "0.3.7", default-features = false, features = ["fmt", "time", "ansi", "smallvec", "env-filter"] }
|
tracing-subscriber = { version = "0.3.7", default-features = false, features = ["fmt", "time", "ansi", "smallvec", "env-filter"] }
|
||||||
petgraph = "0.6.0"
|
petgraph = "0.6.0"
|
||||||
|
|
||||||
|
|
||||||
[[bench]]
|
[[bench]]
|
||||||
name = "chonk_benchmark"
|
name = "chonk_benchmark"
|
||||||
harness = false
|
harness = false
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#![deny(clippy::clone_on_ref_ptr)]
|
#![deny(clippy::clone_on_ref_ptr)]
|
||||||
|
|
||||||
|
use clap::Parser;
|
||||||
use std::{
|
use std::{
|
||||||
error::Error,
|
error::Error,
|
||||||
io::Write,
|
io::Write,
|
||||||
ops::{Div, Mul},
|
ops::{Div, Mul},
|
||||||
};
|
};
|
||||||
use structopt::StructOpt;
|
|
||||||
|
|
||||||
use veloren_common::{
|
use veloren_common::{
|
||||||
assets::{self, AssetExt},
|
assets::{self, AssetExt},
|
||||||
@ -24,7 +24,7 @@ use veloren_common::{
|
|||||||
|
|
||||||
use vek::Vec3;
|
use vek::Vec3;
|
||||||
|
|
||||||
#[derive(StructOpt)]
|
#[derive(Parser)]
|
||||||
struct Cli {
|
struct Cli {
|
||||||
/// Available arguments: "armor-stats", "weapon-stats", "all-items",
|
/// Available arguments: "armor-stats", "weapon-stats", "all-items",
|
||||||
/// "loot-table", "entity-drops"
|
/// "loot-table", "entity-drops"
|
||||||
@ -496,7 +496,7 @@ fn entity_drops(entity_config: &str) -> Result<(), Box<dyn Error>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let args = Cli::from_args();
|
let args = Cli::parse();
|
||||||
if args.function.eq_ignore_ascii_case("armor-stats") {
|
if args.function.eq_ignore_ascii_case("armor-stats") {
|
||||||
if let Err(e) = armor_stats() {
|
if let Err(e) = armor_stats() {
|
||||||
println!("Error: {}\n", e)
|
println!("Error: {}\n", e)
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#![deny(clippy::clone_on_ref_ptr)]
|
#![deny(clippy::clone_on_ref_ptr)]
|
||||||
#![allow(clippy::expect_fun_call)] //TODO: evaluate to remove this and use `unwrap_or_else(panic!(...))` instead
|
#![allow(clippy::expect_fun_call)] //TODO: evaluate to remove this and use `unwrap_or_else(panic!(...))` instead
|
||||||
|
|
||||||
|
use clap::Parser;
|
||||||
use hashbrown::HashMap;
|
use hashbrown::HashMap;
|
||||||
use ron::ser::{to_string_pretty, PrettyConfig};
|
use ron::ser::{to_string_pretty, PrettyConfig};
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use std::{error::Error, fs::File, io::Write};
|
use std::{error::Error, fs::File, io::Write};
|
||||||
use structopt::StructOpt;
|
|
||||||
|
|
||||||
use veloren_common::{
|
use veloren_common::{
|
||||||
assets::ASSETS_PATH,
|
assets::ASSETS_PATH,
|
||||||
@ -19,7 +19,7 @@ use veloren_common::{
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(StructOpt)]
|
#[derive(Parser)]
|
||||||
struct Cli {
|
struct Cli {
|
||||||
/// Available arguments: "armor-stats", "weapon-stats"
|
/// Available arguments: "armor-stats", "weapon-stats"
|
||||||
function: String,
|
function: String,
|
||||||
@ -463,7 +463,7 @@ fn weapon_stats() -> Result<(), Box<dyn Error>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let args = Cli::from_args();
|
let args = Cli::parse();
|
||||||
if args.function.eq_ignore_ascii_case("armor-stats") {
|
if args.function.eq_ignore_ascii_case("armor-stats") {
|
||||||
if get_input(
|
if get_input(
|
||||||
"
|
"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
use clap::Parser;
|
||||||
use hashbrown::HashMap;
|
use hashbrown::HashMap;
|
||||||
use petgraph::{
|
use petgraph::{
|
||||||
dot::{Config, Dot},
|
dot::{Config, Dot},
|
||||||
Graph,
|
Graph,
|
||||||
};
|
};
|
||||||
use std::{fs::File, io::Write};
|
use std::{fs::File, io::Write};
|
||||||
use structopt::StructOpt;
|
|
||||||
use veloren_common::comp::{
|
use veloren_common::comp::{
|
||||||
item::tool::ToolKind,
|
item::tool::ToolKind,
|
||||||
skillset::{
|
skillset::{
|
||||||
@ -12,14 +12,14 @@ use veloren_common::comp::{
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(StructOpt)]
|
#[derive(Parser)]
|
||||||
struct Cli {
|
struct Cli {
|
||||||
/// Available arguments: "sword"
|
/// Available arguments: "sword"
|
||||||
skill_group: String,
|
skill_group: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let args = Cli::from_args();
|
let args = Cli::parse();
|
||||||
let skill_group = match args.skill_group.as_str() {
|
let skill_group = match args.skill_group.as_str() {
|
||||||
"sword" => SkillGroupKind::Weapon(ToolKind::Sword),
|
"sword" => SkillGroupKind::Weapon(ToolKind::Sword),
|
||||||
_ => {
|
_ => {
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
use clap::arg_enum;
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use specs::{Component, DerefFlaggedStorage, VecStorage};
|
use specs::{Component, DerefFlaggedStorage, VecStorage};
|
||||||
|
use strum::EnumVariantNames;
|
||||||
|
|
||||||
arg_enum! {
|
// EnumVariantNames is used by bins for clap only, but using strum here gets rid
|
||||||
#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd, Serialize, Deserialize)]
|
// of the clap dependency
|
||||||
|
#[derive(
|
||||||
|
Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd, Serialize, Deserialize, EnumVariantNames,
|
||||||
|
)]
|
||||||
pub enum AdminRole {
|
pub enum AdminRole {
|
||||||
Moderator = 0,
|
Moderator = 0,
|
||||||
Admin = 1,
|
Admin = 1,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
pub struct Admin(pub AdminRole);
|
pub struct Admin(pub AdminRole);
|
||||||
|
@ -46,6 +46,7 @@ shell-words = "1.0.0"
|
|||||||
tracing = { version = "0.1", default-features = false }
|
tracing = { version = "0.1", default-features = false }
|
||||||
ron = {version = "0.8", default-features = false}
|
ron = {version = "0.8", default-features = false}
|
||||||
serde = {version = "1.0", features = [ "rc", "derive" ]}
|
serde = {version = "1.0", features = [ "rc", "derive" ]}
|
||||||
|
strum = { version = "0.24" }
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
mimalloc = "0.1.29"
|
mimalloc = "0.1.29"
|
||||||
|
@ -2,6 +2,7 @@ use clap::Parser;
|
|||||||
use common::comp;
|
use common::comp;
|
||||||
use server::persistence::SqlLogMode;
|
use server::persistence::SqlLogMode;
|
||||||
use std::sync::mpsc::Sender;
|
use std::sync::mpsc::Sender;
|
||||||
|
use strum::VariantNames;
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
|
|
||||||
#[derive(Clone, Debug, Parser)]
|
#[derive(Clone, Debug, Parser)]
|
||||||
@ -11,7 +12,7 @@ pub enum Admin {
|
|||||||
/// Name of the admin to whom to assign a role
|
/// Name of the admin to whom to assign a role
|
||||||
username: String,
|
username: String,
|
||||||
/// role to assign to the admin
|
/// role to assign to the admin
|
||||||
#[arg(ignore_case = true, value_parser = SqlLogMode::variants())]
|
#[arg(ignore_case = true, value_parser = clap::builder::PossibleValuesParser::new(comp::AdminRole::VARIANTS))]
|
||||||
role: comp::AdminRole,
|
role: comp::AdminRole,
|
||||||
},
|
},
|
||||||
Remove {
|
Remove {
|
||||||
|
Loading…
Reference in New Issue
Block a user