Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSE-108c Project 1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cheuk Pui Lam
CSE-108c Project 1
Commits
fad12d49
Verified
Commit
fad12d49
authored
3 months ago
by
Korben Tompkin
Browse files
Options
Downloads
Patches
Plain Diff
fix(setup): Fixed Cargo.lock and client compiler error
parent
446016dd
No related branches found
Branches containing commit
No related tags found
1 merge request
!3
feat(server): Server implementation
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Cargo.lock
+8
-43
8 additions, 43 deletions
Cargo.lock
client/src/main.rs
+14
-12
14 additions, 12 deletions
client/src/main.rs
with
22 additions
and
55 deletions
Cargo.lock
+
8
−
43
View file @
fad12d49
...
...
@@ -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.9
6
"
version = "2.0.9
8
"
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"
...
...
This diff is collapsed.
Click to expand it.
client/src/main.rs
+
14
−
12
View file @
fad12d49
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
)
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment