Commit fb5b4573 authored by Cyril Plisko's avatar Cyril Plisko 🤔

Update Pager::pager_envs() signature

parent 1ff22a8f
Pipeline #213286659 passed with stage
in 1 minute and 14 seconds
......@@ -164,11 +164,9 @@ impl Pager {
}
/// Launch pager with the specified environment variables
pub fn set_pager_envs(self, envs: &[&str]) -> Self {
Self {
envs: envs.into_iter().map(|x| x.into()).collect(),
..self
}
pub fn pager_envs(self, envs: impl IntoIterator<Item = impl Into<OsString>>) -> Self {
let envs = envs.into_iter().map(|s| s.into()).collect();
Self { envs, ..self }
}
/// Instructs `Pager` to bypass invoking pager if output is not a `tty`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment