Skip to content

Commit 42ed664

Browse files
authored
api/cli: upgrade dependencies and rustc to 1.65.0 (#151)
1 parent a0ad8fc commit 42ed664

File tree

12 files changed

+542
-408
lines changed

12 files changed

+542
-408
lines changed

Cargo.lock

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

api/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ edition = "2021"
1212
name = "reinfer_client"
1313

1414
[dependencies]
15-
chrono = { version = "0.4.19", features = ["serde"] }
15+
chrono = { version = "0.4.22", features = ["serde"] }
1616
log = "0.4.17"
17-
once_cell = "1.12.0"
18-
ordered-float = { version = "3.0.0", features = ["serde"] }
19-
regex = "1.5.6"
20-
reqwest = { version = "0.11.11", default-features = false, features = ["blocking", "gzip", "json", "multipart", "native-tls-vendored"] }
21-
serde = { version = "1.0.137", features = ["derive"] }
22-
serde_json = "1.0.81"
23-
serde_with = "1.14.0"
24-
thiserror = "1.0.31"
25-
url = "2.2.2"
17+
once_cell = "1.16.0"
18+
ordered-float = { version = "3.3.0", features = ["serde"] }
19+
regex = "1.6.0"
20+
reqwest = { version = "0.11.12", default-features = false, features = ["blocking", "gzip", "json", "multipart", "native-tls-vendored"] }
21+
serde = { version = "1.0.147", features = ["derive"] }
22+
serde_json = "1.0.87"
23+
serde_with = "2.0.1"
24+
thiserror = "1.0.37"
25+
url = "2.3.1"
2626

2727
[dev-dependencies]
2828
mockito = "0.31.0"

cli/Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ path = "src/main.rs"
1717
name = "tests"
1818

1919
[dependencies]
20-
anyhow = "1.0.58"
21-
chrono = "0.4.19"
20+
anyhow = "1.0.66"
21+
chrono = "0.4.22"
2222
colored = "2.0.0"
2323
dirs = "4.0.0"
24-
env_logger = "0.9.0"
24+
env_logger = "0.9.1"
2525
indicatif = "0.16.2"
2626
log = { version = "0.4.17", default-features = false, features = ["release_max_level_info"] }
2727
maplit = "1.0.2"
28-
once_cell = "1.12.0"
29-
prettytable-rs = "0.8.0"
30-
regex = "1.5.6"
31-
reqwest = { version = "0.11.11", default-features = false }
32-
serde = { version = "1.0.137", features = ["derive"] }
33-
serde_json = "1.0.81"
28+
once_cell = "1.16.0"
29+
prettytable-rs = "0.9.0"
30+
regex = "1.6.0"
31+
reqwest = { version = "0.11.12", default-features = false }
32+
serde = { version = "1.0.147", features = ["derive"] }
33+
serde_json = "1.0.87"
3434
structopt = { version = "0.3.26", default-features = false }
35-
url = { version = "2.2.2", features = ["serde"] }
35+
url = { version = "2.3.1", features = ["serde"] }
3636

3737
reinfer-client = { version = "0.12.0", path = "../api" }
3838

3939
[dev-dependencies]
40-
pretty_assertions = "1.2.1"
41-
uuid = { version = "1.1.2", features = ["v4"] }
40+
pretty_assertions = "1.3.0"
41+
uuid = { version = "1.2.1", features = ["v4"] }
4242

4343
[features]
4444
default = []

cli/src/commands/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use colored::Colorize;
22
use log::{error, info, warn};
3-
use prettytable::{self, cell, row, Table};
3+
use prettytable::{self, row, Table};
44
use reinfer_client::DEFAULT_ENDPOINT;
55
use reqwest::Url;
66
use std::path::Path;

cli/src/commands/create/emails.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub fn create(client: &Client, args: &CreateEmailsArgs) -> Result<()> {
4747
bucket.full_name(),
4848
bucket.id,
4949
);
50-
let file_metadata = fs::metadata(&emails_path).with_context(|| {
50+
let file_metadata = fs::metadata(emails_path).with_context(|| {
5151
format!(
5252
"Could not get file metadata for `{}`",
5353
emails_path.display()

cli/src/printer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use colored::Colorize;
2-
use prettytable::{cell, format, row, Row, Table};
2+
use prettytable::{format, row, Row, Table};
33
use reinfer_client::{Bucket, Dataset, Project, Source, Trigger, User};
44
use serde::{Serialize, Serializer};
55

cli/tests/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl TestCli {
3838
}
3939

4040
pub fn user(&self) -> User {
41-
let output = self.run(&["--output=json", "get", "current-user"]);
41+
let output = self.run(["--output=json", "get", "current-user"]);
4242
serde_json::from_str::<User>(&output).expect("Failed to deserialize user response")
4343
}
4444

cli/tests/test_buckets.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fn test_bucket_lifecycle() {
99
let new_bucket_name = format!("{}/test-source-{}", owner, Uuid::new_v4());
1010

1111
// Create bucket
12-
let output = cli.run(&[
12+
let output = cli.run([
1313
"create",
1414
"bucket",
1515
&new_bucket_name,
@@ -18,14 +18,14 @@ fn test_bucket_lifecycle() {
1818
]);
1919
assert!(output.contains(&new_bucket_name), "{}", output);
2020

21-
let output = cli.run(&["get", "buckets"]);
21+
let output = cli.run(["get", "buckets"]);
2222
assert!(output.contains(&new_bucket_name), "{}", output);
2323

2424
// Deleting one comment reduces the comment count in the source
25-
let output = cli.run(&["delete", "bucket", &new_bucket_name]);
25+
let output = cli.run(["delete", "bucket", &new_bucket_name]);
2626
assert!(output.is_empty(), "{}", output);
2727

28-
let output = cli.run(&["get", "buckets"]);
28+
let output = cli.run(["get", "buckets"]);
2929
assert!(!output.contains(&new_bucket_name), "{}", output);
3030
}
3131

@@ -36,7 +36,7 @@ fn test_bucket_with_invalid_transform_tag_fails() {
3636

3737
let new_bucket_name = format!("{}/test-source-{}", owner, Uuid::new_v4());
3838

39-
let output = cli.run_and_error(&[
39+
let output = cli.run_and_error([
4040
"create",
4141
"bucket",
4242
&new_bucket_name,
@@ -56,7 +56,7 @@ fn test_bucket_with_invalid_transform_tag_fails() {
5656
fn test_create_without_org_fails() {
5757
let cli = TestCli::get();
5858

59-
let output = cli.run_and_error(&[
59+
let output = cli.run_and_error([
6060
"create",
6161
"bucket",
6262
"bucket-name-without-org",
@@ -74,7 +74,7 @@ fn test_create_without_org_fails() {
7474
fn test_create_with_empty_org_fails() {
7575
let cli = TestCli::get();
7676

77-
let output = cli.run_and_error(&[
77+
let output = cli.run_and_error([
7878
"create",
7979
"bucket",
8080
"/bucket-name-with-empty-org",
@@ -92,7 +92,7 @@ fn test_create_with_empty_org_fails() {
9292
fn test_create_with_empty_bucket_name_fails() {
9393
let cli = TestCli::get();
9494

95-
let output = cli.run_and_error(&[
95+
let output = cli.run_and_error([
9696
"create",
9797
"bucket",
9898
"org-without-bucket-name/",
@@ -110,7 +110,7 @@ fn test_create_with_empty_bucket_name_fails() {
110110
fn test_create_with_too_many_seperators_fails() {
111111
let cli = TestCli::get();
112112

113-
let output = cli.run_and_error(&[
113+
let output = cli.run_and_error([
114114
"create",
115115
"bucket",
116116
"Bucket/Name/with/too/many/seperators/",

cli/tests/test_comments.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ fn check_comments_lifecycle(comments_str: &str, args: Vec<&str>) {
6363
);
6464
assert!(output.is_empty());
6565

66-
let output = cli.run(&["get", "comments", source.identifier()]);
66+
let output = cli.run(["get", "comments", source.identifier()]);
6767
assert_eq!(output.lines().count(), annotated_comments.len());
6868

6969
// Test getting a comment by id to check the content matches
7070
let test_comment = annotated_comments.get(0).unwrap().comment.clone();
71-
let output = cli.run(&[
71+
let output = cli.run([
7272
"get",
7373
"comment",
7474
&format!("--source={}", source.identifier()),
@@ -85,15 +85,15 @@ fn check_comments_lifecycle(comments_str: &str, args: Vec<&str>) {
8585
);
8686

8787
// Deleting one comment reduces the comment count in the source
88-
let output = cli.run(&[
88+
let output = cli.run([
8989
"delete",
9090
"comments",
9191
&format!("--source={}", source.identifier()),
9292
&annotated_comments.get(0).unwrap().comment.id.0,
9393
]);
9494
assert!(output.is_empty());
9595

96-
let output = cli.run(&["get", "comments", source.identifier()]);
96+
let output = cli.run(["get", "comments", source.identifier()]);
9797
assert_eq!(output.lines().count(), annotated_comments.len() - 1);
9898

9999
// Delete all ids
@@ -106,7 +106,7 @@ fn check_comments_lifecycle(comments_str: &str, args: Vec<&str>) {
106106
let output = cli.run(&args);
107107
assert!(output.is_empty());
108108

109-
let output = cli.run(&["get", "comments", source.identifier()]);
109+
let output = cli.run(["get", "comments", source.identifier()]);
110110
assert!(output.is_empty());
111111
}
112112

@@ -130,7 +130,7 @@ fn test_delete_comments_in_range() {
130130

131131
// Upload our test data
132132
let output = cli.run_with_stdin(
133-
&[
133+
[
134134
"create",
135135
"comments",
136136
"--allow-duplicates",
@@ -141,11 +141,11 @@ fn test_delete_comments_in_range() {
141141
);
142142
assert!(output.is_empty());
143143

144-
let uploaded_all = cli.run(&["get", "comments", source.identifier()]);
144+
let uploaded_all = cli.run(["get", "comments", source.identifier()]);
145145
assert_eq!(uploaded_all.lines().count(), num_comments);
146146

147147
// Download annotated comments and check count
148-
let uploaded_annotated = cli.run(&[
148+
let uploaded_annotated = cli.run([
149149
"get",
150150
"comments",
151151
"--reviewed-only",
@@ -163,7 +163,7 @@ fn test_delete_comments_in_range() {
163163
let to_timestamp_str = "2020-02-01T00:00:00Z";
164164
let to_timestamp = DateTime::parse_from_rfc3339(to_timestamp_str).unwrap();
165165

166-
cli.run(&[
166+
cli.run([
167167
"delete",
168168
"bulk",
169169
"--source",
@@ -185,7 +185,7 @@ fn test_delete_comments_in_range() {
185185
.count();
186186

187187
// Get all comments and check counts
188-
let after_deleting_range = cli.run(&[
188+
let after_deleting_range = cli.run([
189189
"get",
190190
"comments",
191191
"--dataset",
@@ -198,7 +198,7 @@ fn test_delete_comments_in_range() {
198198
);
199199

200200
// Delete comments in source, excluding annotated comments
201-
cli.run(&[
201+
cli.run([
202202
"delete",
203203
"bulk",
204204
"--source",
@@ -207,7 +207,7 @@ fn test_delete_comments_in_range() {
207207
]);
208208

209209
// Get all comments and check that only annotated ones are left
210-
let after_deleting_unannotated = cli.run(&[
210+
let after_deleting_unannotated = cli.run([
211211
"get",
212212
"comments",
213213
"--dataset",
@@ -217,15 +217,15 @@ fn test_delete_comments_in_range() {
217217
assert_eq!(after_deleting_unannotated.lines().count(), num_annotated);
218218

219219
// Delete all comments
220-
cli.run(&[
220+
cli.run([
221221
"delete",
222222
"bulk",
223223
&format!("--source={}", source.identifier()),
224224
"--include-annotated=true",
225225
]);
226226

227227
// Get all comments and check there are none left
228-
let after_deleting_all = cli.run(&[
228+
let after_deleting_all = cli.run([
229229
"get",
230230
"comments",
231231
"--dataset",

0 commit comments

Comments
 (0)