diff --git a/timely/Cargo.toml b/timely/Cargo.toml index 5deb5fed8..bf2304da0 100644 --- a/timely/Cargo.toml +++ b/timely/Cargo.toml @@ -16,10 +16,10 @@ license = "MIT" [features] default = ["getopts"] -getopts = ["getopts-dep", "timely_communication/getopts"] +getopts = ["dep:getopts", "timely_communication/getopts"] [dependencies] -getopts-dep = { package = "getopts", version = "0.2.14", optional = true } +getopts = { version = "0.2.14", optional = true } bincode = { version = "1.0" } serde = { version = "1.0", features = ["derive"] } timely_bytes = { path = "../bytes", version = "0.12" } diff --git a/timely/src/execute.rs b/timely/src/execute.rs index 8e173b518..90c3aa088 100644 --- a/timely/src/execute.rs +++ b/timely/src/execute.rs @@ -15,7 +15,7 @@ pub struct Config { } impl Config { - /// Installs options into a [getopts_dep::Options] struct that correspond + /// Installs options into a [getopts::Options] struct that correspond /// to the parameters in the configuration. /// /// It is the caller's responsibility to ensure that the installed options @@ -25,7 +25,7 @@ impl Config { /// This method is only available if the `getopts` feature is enabled, which /// it is by default. #[cfg(feature = "getopts")] - pub fn install_options(opts: &mut getopts_dep::Options) { + pub fn install_options(opts: &mut getopts::Options) { CommunicationConfig::install_options(opts); WorkerConfig::install_options(opts); } @@ -33,13 +33,13 @@ impl Config { /// Instantiates a configuration based upon the parsed options in `matches`. /// /// The `matches` object must have been constructed from a - /// [getopts_dep::Options] which contained at least the options installed by + /// [getopts::Options] which contained at least the options installed by /// [Self::install_options]. /// /// This method is only available if the `getopts` feature is enabled, which /// it is by default. #[cfg(feature = "getopts")] - pub fn from_matches(matches: &getopts_dep::Matches) -> Result { + pub fn from_matches(matches: &getopts::Matches) -> Result { Ok(Config { communication: CommunicationConfig::from_matches(matches)?, worker: WorkerConfig::from_matches(matches)?, @@ -51,7 +51,7 @@ impl Config { /// Most commonly, callers supply `std::env::args()` as the iterator. #[cfg(feature = "getopts")] pub fn from_args>(args: I) -> Result { - let mut opts = getopts_dep::Options::new(); + let mut opts = getopts::Options::new(); Config::install_options(&mut opts); let matches = opts.parse(args).map_err(|e| e.to_string())?; Config::from_matches(&matches) diff --git a/timely/src/worker.rs b/timely/src/worker.rs index b0af6363b..21ef842b5 100644 --- a/timely/src/worker.rs +++ b/timely/src/worker.rs @@ -92,7 +92,7 @@ pub struct Config { } impl Config { - /// Installs options into a [getopts_dep::Options] struct that correspond + /// Installs options into a [getopts::Options] struct that correspond /// to the parameters in the configuration. /// /// It is the caller's responsibility to ensure that the installed options @@ -102,20 +102,20 @@ impl Config { /// This method is only available if the `getopts` feature is enabled, which /// it is by default. #[cfg(feature = "getopts")] - pub fn install_options(opts: &mut getopts_dep::Options) { + pub fn install_options(opts: &mut getopts::Options) { opts.optopt("", "progress-mode", "progress tracking mode (eager or demand)", "MODE"); } /// Instantiates a configuration based upon the parsed options in `matches`. /// /// The `matches` object must have been constructed from a - /// [getopts_dep::Options] which contained at least the options installed by + /// [getopts::Options] which contained at least the options installed by /// [Self::install_options]. /// /// This method is only available if the `getopts` feature is enabled, which /// it is by default. #[cfg(feature = "getopts")] - pub fn from_matches(matches: &getopts_dep::Matches) -> Result { + pub fn from_matches(matches: &getopts::Matches) -> Result { let progress_mode = matches .opt_get_default("progress-mode", ProgressMode::Eager)?; Ok(Config::default().progress_mode(progress_mode))