mirror of
https://github.com/clap-rs/clap
synced 2025-03-04 23:37:32 +00:00
fix: Add back in write_version
This commit is contained in:
parent
0d1f34b91d
commit
d876f306eb
1 changed files with 12 additions and 0 deletions
|
@ -1983,6 +1983,12 @@ impl<'help> App<'help> {
|
|||
self._render_version(false)
|
||||
}
|
||||
|
||||
/// Deprecated, replaced with [`App::render_version`]
|
||||
#[deprecated(since = "3.0.0", note = "Replaced with `App::render_version`")]
|
||||
pub fn write_version<W: Write>(&self, w: &mut W) -> ClapResult<()> {
|
||||
write!(w, "{}", self.render_version()).map_err(From::from)
|
||||
}
|
||||
|
||||
/// Version message rendered as if the user ran `--version`.
|
||||
///
|
||||
/// See also [`App::render_version`].
|
||||
|
@ -2007,6 +2013,12 @@ impl<'help> App<'help> {
|
|||
self._render_version(true)
|
||||
}
|
||||
|
||||
/// Deprecated, replaced with [`App::render_long_version`]
|
||||
#[deprecated(since = "3.0.0", note = "Replaced with `App::render_long_version`")]
|
||||
pub fn write_long_version<W: Write>(&self, w: &mut W) -> ClapResult<()> {
|
||||
write!(w, "{}", self.render_long_version()).map_err(From::from)
|
||||
}
|
||||
|
||||
/// Usage statement
|
||||
///
|
||||
/// ### Examples
|
||||
|
|
Loading…
Add table
Reference in a new issue