Skip to content
Snippets Groups Projects
Verified Commit fad12d49 authored by Korben Tompkin's avatar Korben Tompkin :mortar_board:
Browse files

fix(setup): Fixed Cargo.lock and client compiler error

parent 446016dd
No related branches found
No related tags found
1 merge request!3feat(server): Server implementation
......@@ -255,6 +255,12 @@ version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "http"
version = "1.2.0"
......@@ -336,12 +342,6 @@ dependencies = [
"tower-service",
]
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
......@@ -527,24 +527,6 @@ dependencies = [
"serde",
]
[[package]]
name = "proc-macro2"
version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [
"proc-macro2",
]
[[package]]
name = "server"
version = "0.1.0"
......@@ -579,9 +561,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
version = "2.0.96"
version = "2.0.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
dependencies = [
"proc-macro2",
"quote",
......@@ -674,23 +656,6 @@ version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034"
[[package]]
name = "syn"
version = "2.0.96"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "unicode-ident"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]]
name = "utf8parse"
version = "0.2.2"
......
use clap::{Parser, Subcommand, Args};
use clap::{Args, Parser, Subcommand};
#[derive(Parser)]
#[command(author, version, about, long_about = None)]
struct Cli{
struct Cli {
/// Which command to run
#[command(subcommand)]
cmd: Commands
cmd: Commands,
}
#[derive(Subcommand, Debug)]
......@@ -13,29 +13,31 @@ enum Commands {
/// Initialize server
Init(InitArgs),
/// Search for string
Search(ClientArgs)
Search(ClientArgs),
}
#[derive(Args, Debug)]
struct InitArgs{
struct InitArgs {
/// filename to be uploaded, must be a file of csv format
#[arg(short, long)]
filename: Option<String>
filename: Option<String>,
}
#[derive(Args, Debug)]
struct ClientArgs{
struct ClientArgs {
#[arg(short, long)]
string:Box<String>
string: Box<String>,
}
fn main() {
let cli = Cli::parse();
match &cli.cmd {
Commands::Init(filename) => {println!("Init {:?}", filename.string)}
Commands::Search(search_string) => {println!("Search {:?}", search_string.string)}
Commands::Init(filename) => {
println!("Init {:?}", filename.filename)
}
Commands::Search(search_string) => {
println!("Search {:?}", search_string.string)
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment