Skip to content

Commit

Permalink
reverted options to original names (bad structopt -> clap migration)
Browse files Browse the repository at this point in the history
  • Loading branch information
westandskif committed Jul 17, 2023
1 parent e30b440 commit cfd0156
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.16.2 (2023-07-17)

- reverted `--save` (base), `--version-mirror-concurrency` (endeavouros),
`--separator` (stdin) option name

# 0.16.1 (2023-07-17)

- reverted `--eps-checks` default to 40 (back to strict threshold on early
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rate_mirrors"
version = "0.16.1"
version = "0.16.2"
authors = ["Nikita Almakov <[email protected]>"]
edition = "2021"
description = "Everyday-use client-side map-aware mirror ranking tool (Arch Linux; Manjaro; custom ones)"
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ pub struct Config {
pub top_mirrors_number_to_retest: usize,

/// Filename to save the output to in case of success
#[arg(env = "RATE_MIRRORS_SAVE", long, verbatim_doc_comment)]
#[arg(env = "RATE_MIRRORS_SAVE", long = "save", verbatim_doc_comment)]
pub save_to_file: Option<String>,

/// Allow running by root
Expand Down
2 changes: 1 addition & 1 deletion src/target_configs/endeavouros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub struct EndeavourOSTarget {
long,
default_value = "40"
)]
pub version_mirrors_concurrency: usize,
pub version_mirror_concurrency: usize,

/// Either url or path to EndeavourOS mirror list file
#[arg(
Expand Down
2 changes: 1 addition & 1 deletion src/target_configs/stdin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ pub struct StdinTarget {

/// input separator to use when parsing mirrors list
#[arg(env = "RATE_MIRRORS_SEPARATOR", long, default_value = "\t")]
pub input_separator: String,
pub separator: String,
}
2 changes: 1 addition & 1 deletion src/targets/endeavouros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fn version_mirrors(
let runtime = tokio::runtime::Runtime::new().unwrap();
let _sth = runtime.enter();

let semaphore = Arc::new(Semaphore::new(target.version_mirrors_concurrency));
let semaphore = Arc::new(Semaphore::new(target.version_mirror_concurrency));

let handles = mirrors.into_iter().map(|mirror| {
runtime.spawn(version_mirror(
Expand Down
2 changes: 1 addition & 1 deletion src/targets/stdin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl FetchMirrors for StdinTarget {
.lock()
.lines()
.filter_map(
|line| match MirrorInfo::parse(&line.unwrap(), &self.input_separator) {
|line| match MirrorInfo::parse(&line.unwrap(), &self.separator) {
Ok(info) => Some(Mirror {
country: info.country,
url_to_test: info
Expand Down

0 comments on commit cfd0156

Please sign in to comment.