pager.rs: Limit visibilities to pub(crate)

This commit is contained in:
Martin Nordholts 2021-01-10 13:07:24 +01:00
parent 02e6ff4183
commit fc30277cfa
1 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@ use std::env;
/// If we use a pager, this enum tells us from where we were told to use it. /// If we use a pager, this enum tells us from where we were told to use it.
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
pub enum PagerSource { pub(crate) enum PagerSource {
/// From --config /// From --config
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 /// We know about some pagers, for example 'less'. This is a list of all pagers we know about
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
pub enum PagerKind { pub(crate) enum PagerKind {
/// The pager is ourselves /// The pager is ourselves
Bat, Bat,
@ -61,7 +61,7 @@ impl PagerKind {
/// A pager such as 'less', and from where we got it. /// A pager such as 'less', and from where we got it.
#[derive(Debug)] #[derive(Debug)]
pub struct Pager { pub(crate) struct Pager {
// The pager binary // The pager binary
pub bin: String, pub bin: String,
@ -87,7 +87,7 @@ impl Pager {
} }
/// Returns what pager to use, after looking at both config and environment variables. /// Returns what pager to use, after looking at both config and environment variables.
pub fn get_pager(config_pager: Option<&str>) -> Result<Option<Pager>, ParseError> { pub(crate) fn get_pager(config_pager: Option<&str>) -> Result<Option<Pager>, ParseError> {
let bat_pager = env::var("BAT_PAGER"); let bat_pager = env::var("BAT_PAGER");
let pager = env::var("PAGER"); let pager = env::var("PAGER");