From fc30277cfa7c5d0df186460d572af074d0a5aa60 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Sun, 10 Jan 2021 13:07:24 +0100 Subject: [PATCH] pager.rs: Limit visibilities to pub(crate) --- src/pager.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pager.rs b/src/pager.rs index 6b89d963..947f522d 100644 --- a/src/pager.rs +++ b/src/pager.rs @@ -3,7 +3,7 @@ use std::env; /// If we use a pager, this enum tells us from where we were told to use it. #[derive(Debug, PartialEq)] -pub enum PagerSource { +pub(crate) enum PagerSource { /// From --config Config, @@ -19,7 +19,7 @@ pub enum PagerSource { /// We know about some pagers, for example 'less'. This is a list of all pagers we know about #[derive(Debug, PartialEq)] -pub enum PagerKind { +pub(crate) enum PagerKind { /// The pager is ourselves Bat, @@ -61,7 +61,7 @@ impl PagerKind { /// A pager such as 'less', and from where we got it. #[derive(Debug)] -pub struct Pager { +pub(crate) struct Pager { // The pager binary pub bin: String, @@ -87,7 +87,7 @@ impl Pager { } /// Returns what pager to use, after looking at both config and environment variables. -pub fn get_pager(config_pager: Option<&str>) -> Result, ParseError> { +pub(crate) fn get_pager(config_pager: Option<&str>) -> Result, ParseError> { let bat_pager = env::var("BAT_PAGER"); let pager = env::var("PAGER");