Skip to content

Commit 0f39aba

Browse files
committed
Auto merge of #4039 - rust-lang:renovate/clap-3.x, r=Turbo87
Update Rust crate clap to v3.0.0-beta.5 [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [clap](https://crates.io/crates/clap) | dependencies | patch | `=3.0.0-beta.4` -> `=3.0.0-beta.5` | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/rust-lang/crates.io).
2 parents 4ef7877 + 620f155 commit 0f39aba

11 files changed

+32
-34
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ base64 = "0.13"
3535
cargo-registry-markdown = { path = "cargo-registry-markdown" }
3636
cargo-registry-s3 = { path = "cargo-registry-s3" }
3737
chrono = { version = "0.4.0", features = ["serde"] }
38-
clap = "=3.0.0-beta.4"
38+
clap = "=3.0.0-beta.5"
3939

4040
conduit = "0.9.0-alpha.5"
4141
conduit-conditional-get = "0.9.0-alpha.3"

src/admin/delete_crate.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
use crate::{admin::dialoguer, db, models::Crate, schema::crates};
22

3-
use clap::Clap;
43
use diesel::prelude::*;
54

6-
#[derive(Clap, Debug)]
5+
#[derive(clap::Parser, Debug)]
76
#[clap(
87
name = "delete-crate",
98
about = "Purge all references to a crate from the database.",

src/admin/delete_version.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ use crate::{
55
schema::versions,
66
};
77

8-
use clap::Clap;
98
use diesel::prelude::*;
109

11-
#[derive(Clap, Debug)]
10+
#[derive(clap::Parser, Debug)]
1211
#[clap(
1312
name = "delete-version",
1413
about = "Purge all references to a crate's version from the database.",

src/admin/migrate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use anyhow::Error;
33
static CATEGORIES_TOML: &str = include_str!("../boot/categories.toml");
44
diesel_migrations::embed_migrations!("./migrations");
55

6-
#[derive(clap::Clap, Debug, Copy, Clone)]
6+
#[derive(clap::Parser, Debug, Copy, Clone)]
77
#[clap(
88
name = "migrate",
99
about = "Verify config, migrate the database, and other release tasks."

src/admin/populate.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
use crate::{db, schema::version_downloads};
22

3-
use clap::Clap;
43
use diesel::prelude::*;
54
use rand::{thread_rng, Rng};
65

7-
#[derive(Clap, Debug)]
6+
#[derive(clap::Parser, Debug)]
87
#[clap(
98
name = "populate",
109
about = "Populate a set of dummy download statistics for a specific version in the database."

src/admin/render_readmes.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use std::{io::Read, path::Path, sync::Arc, thread};
88

99
use cargo_registry_markdown::text_to_html;
1010
use chrono::{TimeZone, Utc};
11-
use clap::Clap;
1211
use diesel::{dsl::any, prelude::*};
1312
use flate2::read::GzDecoder;
1413
use reqwest::{blocking::Client, header};
@@ -17,7 +16,7 @@ use tar::{self, Archive};
1716
const CACHE_CONTROL_README: &str = "public,max-age=604800";
1817
const USER_AGENT: &str = "crates-admin";
1918

20-
#[derive(Clap, Debug)]
19+
#[derive(clap::Parser, Debug)]
2120
#[clap(
2221
name = "render-readmes",
2322
about = "Iterates over every crate versions ever uploaded and (re-)renders their \

src/admin/test_pagerduty.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use anyhow::Result;
2-
use clap::Clap;
32
use std::str::FromStr;
43

54
use crate::admin::on_call;
@@ -24,7 +23,7 @@ impl FromStr for EventType {
2423
}
2524
}
2625

27-
#[derive(Clap, Debug)]
26+
#[derive(clap::Parser, Debug)]
2827
#[clap(name = "test-pagerduty", about = "Send a test event to pagerduty")]
2928
pub struct Opts {
3029
#[clap(possible_values = &["trigger", "acknowledge", "resolve"])]

src/admin/transfer_crates.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ use crate::{
66
};
77
use std::process::exit;
88

9-
use clap::Clap;
109
use diesel::prelude::*;
1110

12-
#[derive(Clap, Debug)]
11+
#[derive(clap::Parser, Debug)]
1312
#[clap(
1413
name = "transfer-crates",
1514
about = "Transfer all crates from one user to another."

src/admin/verify_token.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
use crate::{db, models::User, util::errors::AppResult};
22

3-
use clap::Clap;
4-
5-
#[derive(Clap, Debug)]
3+
#[derive(clap::Parser, Debug)]
64
#[clap(
75
name = "verify-token",
86
about = "Look up a username by API token.",

src/bin/crates-admin.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@ use cargo_registry::admin::{
55
transfer_crates, verify_token,
66
};
77

8-
use clap::Clap;
9-
10-
#[derive(Clap, Debug)]
8+
#[derive(clap::Parser, Debug)]
119
#[clap(name = "crates-admin")]
1210
struct Opts {
1311
#[clap(subcommand)]
1412
command: SubCommand,
1513
}
1614

17-
#[derive(Clap, Debug)]
15+
#[derive(clap::Parser, Debug)]
1816
enum SubCommand {
1917
DeleteCrate(delete_crate::Opts),
2018
DeleteVersion(delete_version::Opts),
@@ -27,6 +25,8 @@ enum SubCommand {
2725
}
2826

2927
fn main() -> anyhow::Result<()> {
28+
use clap::Parser;
29+
3030
let opts: Opts = Opts::parse();
3131

3232
match opts.command {

0 commit comments

Comments
 (0)