Skip to content

Commit bf00423

Browse files
bors[bot]MikailBag
andauthored
Merge #405
405: Update deps r=MikailBag a=MikailBag Co-authored-by: Mikail Bagishov <[email protected]>
2 parents 7441e1e + df322bf commit bf00423

File tree

30 files changed

+819
-771
lines changed

30 files changed

+819
-771
lines changed

Cargo.lock

Lines changed: 645 additions & 587 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cli/Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ description = "JJS CLI client"
99
util = {path = "../util"}
1010
client = {path = "../client"}
1111
pom = { path = "../pom" }
12-
base64 = "0.12.3"
13-
serde_json = "1.0.57"
14-
serde = "1.0.115"
15-
futures = { version = "0.3.5", features = ["compat"] }
12+
base64 = "0.13.0"
13+
serde_json = "1.0.59"
14+
serde = "1.0.117"
15+
futures = { version = "0.3.7", features = ["compat"] }
1616
tokio = { version = "0.2.22", features = ["macros", "rt-core", "io-std", "process"] }
1717
log = "0.4.11"
18-
anyhow = "1.0.32"
19-
clap = "3.0.0-beta.1"
20-
either = "1.6.0"
21-
clap_generate = "3.0.0-beta.1"
22-
dialoguer = "0.6.2"
18+
anyhow = "1.0.33"
19+
clap = "3.0.0-beta.2"
20+
either = "1.6.1"
21+
clap_generate = "3.0.0-beta.2"
22+
dialoguer = "0.7.1"
2323
xdg = "2.2.0"
24-
serde_yaml = "0.8.13"
24+
serde_yaml = "0.8.14"
2525
tar = "0.4.30"
2626
humansize = "1.1.0"
27-
flate2 = "1.0.17"
27+
flate2 = "1.0.18"

src/cli/src/completion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub(crate) struct Opt {
1111
}
1212

1313
fn generate<G: clap_generate::Generator>() {
14-
let mut app: clap::App = <crate::Opt as clap::derive::IntoApp>::into_app();
14+
let mut app: clap::App = <crate::Opt as clap::IntoApp>::into_app();
1515
clap_generate::generate::<G, _>(&mut app, "jjs-cli", &mut std::io::stdout());
1616
}
1717

src/cli/src/runs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use client::prelude::Sendable as _;
44
pub struct Opt {
55
/// Action: view, remove or rejudge
66
action: String,
7-
#[clap(long = "filter", short = "f", default_value = "true")]
7+
#[clap(long = "filter", short = 'f', default_value = "true")]
88
_filter: String,
99
}
1010

src/cli/src/submit.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ use either::Either;
44
#[derive(clap::Clap)]
55
pub struct Opt {
66
/// problem code, e.g. "A"
7-
#[clap(long, short = "p")]
7+
#[clap(long, short = 'p')]
88
problem: String,
9-
#[clap(long, short = "t")]
9+
#[clap(long, short = 't')]
1010
toolchain: String,
11-
#[clap(long, short = "f")]
11+
#[clap(long, short = 'f')]
1212
filename: String,
13-
#[clap(long, short = "c")]
13+
#[clap(long, short = 'c')]
1414
contest: String,
1515
/// Watch for judging finish
16-
#[clap(long, short = "w")]
16+
#[clap(long, short = 'w')]
1717
watch: bool,
1818
}
1919

src/client/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ edition = "2018"
66

77
[dependencies]
88
openapi = {path = "../gen-api-client"}
9-
hyper = "0.13.7"
9+
hyper = "0.13.8"
1010
tokio = "0.2.22"
11-
serde_json = "1.0.57"
11+
serde_json = "1.0.59"
1212
http = "0.2.1"
13-
async-trait = "0.1.40"
14-
anyhow = "1.0.32"
15-
serde = "1.0.115"
13+
async-trait = "0.1.41"
14+
anyhow = "1.0.33"
15+
serde = "1.0.117"
1616
url = "2.1.1"
17-
serde_yaml = "0.8.13"
17+
serde_yaml = "0.8.14"
1818
xdg = "2.2.0"
19-
tracing = "0.1.19"
19+
tracing = "0.1.21"
2020
tracing-futures = "0.2.4"

src/devtool/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ authors = ["Mikail Bagishov <[email protected]>"]
55
edition = "2018"
66

77
[dependencies]
8-
structopt = "0.3.17"
9-
serde = { version = "1.0.115", features = ["derive"] }
8+
clap = "3.0.0-beta.2"
9+
serde = { version = "1.0.117", features = ["derive"] }
1010
log = "0.4.11"
11-
env_logger = "0.7.1"
11+
env_logger = "0.8.1"
1212
ignore = "0.4.16"
13-
toml = "0.5.6"
13+
toml = "0.5.7"
1414
atty = "0.2.14"
1515
util = {path = "../util"}
1616
lazy_static = "1.4.0"
17-
anyhow = "1.0.32"
18-
serde_json = "1.0.57"
17+
anyhow = "1.0.33"
18+
serde_json = "1.0.59"
1919
tempfile = "3.1.0"

src/devtool/src/build.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
use crate::ci::{detect_build_type, DeployKind};
2+
use clap::Clap;
23
use std::process::Command;
3-
use structopt::StructOpt;
44
use util::cmd::{CommandExt, Runner};
55

6-
#[derive(StructOpt)]
6+
#[derive(Clap)]
77
pub(crate) struct RawBuildOpts {
88
/// enable things that are not required for running tests
9-
#[structopt(long)]
9+
#[clap(long)]
1010
full: bool,
1111
/// Enable docker
12-
#[structopt(long)]
12+
#[clap(long)]
1313
docker: bool,
1414
/// Setup (useful for development)
15-
#[structopt(long)]
15+
#[clap(long)]
1616
setup: bool,
1717
/// Debian packages
18-
#[structopt(long)]
18+
#[clap(long)]
1919
deb: bool,
2020
/// Additional options to pass to configure
21-
#[structopt(long = "configure-opt")]
21+
#[clap(long = "configure-opt")]
2222
configure: Vec<String>,
2323
/// Build all docs
24-
#[structopt(long)]
24+
#[clap(long)]
2525
docs: bool,
2626
}
2727

src/devtool/src/check.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use anyhow::Context as _;
2+
use clap::Clap;
23
use log::{debug, info};
34
use std::process::Command;
4-
use structopt::StructOpt;
55
use util::cmd::{CommandExt, Runner};
66

77
fn cmake_bin() -> &'static str {
@@ -83,25 +83,25 @@ fn check_testlib(runner: &Runner) {
8383
.run_on(runner);
8484
}
8585

86-
#[derive(StructOpt)]
86+
#[derive(Clap)]
8787
pub struct CheckOpts {
8888
/// Run autopep8
89-
#[structopt(long)]
89+
#[clap(long)]
9090
autopep8: bool,
9191
/// Run shellcheck
92-
#[structopt(long)]
92+
#[clap(long)]
9393
shellcheck: bool,
9494
/// Build testlib
95-
#[structopt(long)]
95+
#[clap(long)]
9696
testlib: bool,
9797
/// Analyze testlib
98-
#[structopt(long)]
98+
#[clap(long)]
9999
clang_analyzer: bool,
100100
/// Do not run default checks
101-
#[structopt(long)]
101+
#[clap(long)]
102102
no_default: bool,
103103
/// Exit with status 1 as soon as any invoked command fails
104-
#[structopt(long)]
104+
#[clap(long)]
105105
pub(crate) fail_fast: bool,
106106
}
107107

src/devtool/src/ci.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,16 @@ pub struct BuildInfo {
7070

7171
impl BuildInfo {
7272
pub fn is_deploy(&self) -> bool {
73-
match self.ty {
74-
BuildType::Deploy(_) => true,
75-
_ => false,
76-
}
73+
matches!(self.ty, BuildType::Deploy(_))
7774
}
7875

7976
pub fn is_pr_e2e(&self) -> bool {
80-
match self.ty {
77+
matches!(self.ty,
8178
BuildType::Check {
8279
ty: CheckJobType::EndToEnd,
8380
..
84-
} => true,
85-
_ => false,
86-
}
81+
}
82+
)
8783
}
8884

8985
pub fn deploy_info(&self) -> Option<DeployKind> {
@@ -154,10 +150,7 @@ fn do_detect_build_type() -> BuildType {
154150
};
155151

156152
let job_ty = CheckJobType::detect().expect("failed to detech check job");
157-
let privileged = match branch_name {
158-
"trying" | "staging" | "master" => true,
159-
_ => false,
160-
};
153+
let privileged = matches!(branch_name, "trying" | "staging" | "master");
161154
BuildType::Check {
162155
ty: job_ty,
163156
privileged,

0 commit comments

Comments
 (0)