diff options
author | Cyril Plisko <cyril.plisko@mountall.com> | 2016-08-29 11:55:58 +0300 |
---|---|---|
committer | Cyril Plisko <cyril.plisko@mountall.com> | 2016-08-29 11:56:27 +0300 |
commit | 2c56f027fb3a2c66cd92b1b89335465dc2f417b3 (patch) | |
tree | 73670b378638ca1164c2904d33c8576ba9537b2e /src | |
parent | a5f4c7713b61afe7e48fe4126f35e0de009eda5c (diff) |
Reuse Pager::env() for default ::new()
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -53,13 +53,7 @@ pub struct Pager { impl Pager { /// Creates new instance of pager with default settings pub fn new() -> Self { - let pager = utils::find_pager(DEFAULT_PAGER_ENV); - - Pager { - pager: pager, - env: DEFAULT_PAGER_ENV.into(), - ok: true, - } + Pager::env(DEFAULT_PAGER_ENV) } /// Creates new instance of pager using `env` environment variable instead of PAGER |