summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCyril Plisko <cyril.plisko@mountall.com>2016-08-29 11:55:58 +0300
committerCyril Plisko <cyril.plisko@mountall.com>2016-08-29 11:56:27 +0300
commit2c56f027fb3a2c66cd92b1b89335465dc2f417b3 (patch)
tree73670b378638ca1164c2904d33c8576ba9537b2e /src
parenta5f4c7713b61afe7e48fe4126f35e0de009eda5c (diff)
Reuse Pager::env() for default ::new()
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 96a6e87..4aedc29 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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