diff options
author | Cyril Plisko <cyril.plisko@mountall.com> | 2020-11-08 13:45:53 +0200 |
---|---|---|
committer | Cyril Plisko <cyril.plisko@mountall.com> | 2020-11-08 13:45:53 +0200 |
commit | fb5b45736c89296b50ef305a550d16fd7c022c87 (patch) | |
tree | 4a0e1ccc0e214564e83716e25005e4287ff3f3e8 | |
parent | 1ff22a8fc392f9f01aca5cc3a9add09309e903c5 (diff) |
Update Pager::pager_envs() signature
-rw-r--r-- | src/lib.rs | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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` |