Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
collective
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
Eduardo Trujillo
collective
Commits
91bd4604
Verified
Commit
91bd4604
authored
3 years ago
by
Eduardo Trujillo
Browse files
Options
Downloads
Patches
Plain Diff
fix(cli): Update for Clap v3 beta 5
parent
13712120
Branches
renovate/log-0.x-lockfile
No related tags found
No related merge requests found
Pipeline
#203
failed
3 years ago
Stage: format
Stage: build
Stage: lint
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Cargo.lock
+31
-24
31 additions, 24 deletions
Cargo.lock
Cargo.toml
+1
-1
1 addition, 1 deletion
Cargo.toml
src/cli.rs
+2
-2
2 additions, 2 deletions
src/cli.rs
with
34 additions
and
27 deletions
Cargo.lock
+
31
−
24
View file @
91bd4604
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "aho-corasick"
version = "0.7.15"
...
...
@@ -40,9 +42,9 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "clap"
version = "3.0.0-beta.
2
"
version = "3.0.0-beta.
5
"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
4bd1061998a501ee7d4b6d449020df3266ca3124b941ec56cf2005c3779ca142
"
checksum = "
feff3878564edb93745d58cf63e17b63f24142506e7a20c87a5521ed7bfb1d63
"
dependencies = [
"atty",
"bitflags",
...
...
@@ -53,15 +55,14 @@ dependencies = [
"strsim",
"termcolor",
"textwrap",
"unicode-width",
"vec_map",
"unicase",
]
[[package]]
name = "clap_derive"
version = "3.0.0-beta.
2
"
version = "3.0.0-beta.
5
"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
370f715b81112975b1b69db93e0b56ea4cd4e5002ac43b2da8474106a54096a1
"
checksum = "
8b15c6b4f786ffb6192ffe65a36855bc1fc2444bcd0945ae16748dcd6ed7d0d3
"
dependencies = [
"heck",
"proc-macro-error",
...
...
@@ -181,15 +182,18 @@ dependencies = [
[[package]]
name = "memchr"
version = "2.
3.4
"
version = "2.
4.1
"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525
"
checksum = "
308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a
"
[[package]]
name = "os_str_bytes"
version = "
2.4
.0"
version = "
4.2
.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afb2e1c3ee07430c2cf76151675e583e0f19985fa6efae47d6848a3e2c824f85"
checksum = "addaa943333a514159c80c97ff4a93306530d965d27e139188283cd13e06a799"
dependencies = [
"memchr",
]
[[package]]
name = "pear"
...
...
@@ -250,9 +254,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.2
4
"
version = "1.0.
3
2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
1e0704ee1a7e00d7bb417d0770ea303c1bcc
bab
f
0ef
1667dae92b5967f5f8a71
"
checksum = "
ba508cc11742c0dc5c1659771673af
bab
7a
0ef
ab23aa17e854cbab0837ed0b43
"
dependencies = [
"unicode-xid",
]
...
...
@@ -278,9 +282,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quote"
version = "1.0.
8
"
version = "1.0.
10
"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df
"
checksum = "
38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05
"
dependencies = [
"proc-macro2",
]
...
...
@@ -317,9 +321,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "syn"
version = "1.0.
57
"
version = "1.0.
81
"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
4211ce9909eb971f111059df92c45640aad50a619cf55cd76476be803c4c68e
6"
checksum = "
f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f986096
6"
dependencies = [
"proc-macro2",
"quote",
...
...
@@ -337,9 +341,9 @@ dependencies = [
[[package]]
name = "textwrap"
version = "0.1
2.1
"
version = "0.1
4.2
"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
203008d98caf094106cfaba70acfed15e18ed3ddb7d94e49baec153a2b462789
"
checksum = "
0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80
"
dependencies = [
"unicode-width",
]
...
...
@@ -391,6 +395,15 @@ dependencies = [
"version_check",
]
[[package]]
name = "unicase"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
dependencies = [
"version_check",
]
[[package]]
name = "unicode-segmentation"
version = "1.7.1"
...
...
@@ -409,12 +422,6 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
[[package]]
name = "vec_map"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
[[package]]
name = "version_check"
version = "0.9.2"
...
...
This diff is collapsed.
Click to expand it.
Cargo.toml
+
1
−
1
View file @
91bd4604
...
...
@@ -9,6 +9,6 @@ serde = "1.0"
log
=
"0.4"
toml
=
"0.5"
thiserror
=
"1.0"
clap
=
"3.0.0-beta.
2
"
clap
=
"3.0.0-beta.
5
"
pretty_env_logger
=
"0.4"
figment
=
{
version
=
"0.10"
,
features
=
[
"toml"
,
"env"
]
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/cli.rs
+
2
−
2
View file @
91bd4604
use
std
::
path
::
PathBuf
;
use
clap
::{
Clap
,
IntoApp
};
use
clap
::{
IntoApp
,
Parser
};
use
log
::
LevelFilter
;
use
serde
::{
de
::
DeserializeOwned
,
Serialize
};
use
thiserror
::
Error
;
...
...
@@ -15,7 +15,7 @@ pub enum CliError {
Config
(
#[from]
config
::
ConfigError
),
}
pub
trait
AppOpts
:
Clap
{
pub
trait
AppOpts
:
Parser
{
fn
try_init
()
->
Result
<
Self
,
CliError
>
{
let
result
=
Self
::
try_parse
()
.map_err
(
CliError
::
ArgParse
);
...
...
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