remove deprecated Argument function

repl
Avril 3 years ago
parent 06208ee535
commit b78475b91a
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -65,18 +65,6 @@ impl Argument
_ => return None,
})
}
/// Convert into a mode change if this is a mode change
// We consume the whole output here in case the mode change needs to traverse it for information. As of now, we have only one non-`Normal` mode: `Help`, which doesn't require any extra information.
#[deprecated(note = "mode selection happens in `into_mode` and early return through `Continue::Abort` will be removed or reworked to not require this function.")]
pub fn try_into_mode(self, _rest: Output) -> Result<Mode, (Self, Output)>
{
match self {
Self::ModeChangeHelp => Ok(Mode::Help),
no => Err((no, _rest)),
}
}
/// Insert this `Argument` into config
pub fn insert_into_cfg(self, cfg: &mut Config)
{

@ -172,7 +172,7 @@ async fn parse_mode() -> eyre::Result<()>
{
match arg::parse_args()
.wrap_err(eyre!("Failed to parse args"))
.with_suggestion(|| "Try `--help`")?
.with_suggestion(|| "Try running `--help`")?
{
arg::Mode::Normal(cfg) => {
#[cfg(debug_assertions)] eprintln!("cfg: {:#?}", cfg);

Loading…
Cancel
Save