We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf60d05 commit 509924aCopy full SHA for 509924a
1 file changed
src/man_page.rs
@@ -1,6 +1,6 @@
1
use crate::args::Args;
2
use clap::{Arg, ArgAction, Command, CommandFactory};
3
-use std::fmt::Write;
+use std::{borrow::Cow, fmt::Write};
4
5
/// Renders the man page for `pdu` as a string in roff format.
6
pub fn render_man_page() -> String {
@@ -199,7 +199,8 @@ fn render_value_hint(arg: &Arg) -> String {
199
let defaults: Vec<_> = arg
200
.get_default_values()
201
.iter()
202
- .map(|value| value.to_string_lossy().into_owned())
+ .map(|value| value.to_string_lossy())
203
+ .map(Cow::into_owned)
204
.collect();
205
if !defaults.is_empty()
206
&& !arg.is_hide_default_value_set()
0 commit comments