From a291a8c2e8716312f861f9bd429b8848c4ba7c45 Mon Sep 17 00:00:00 2001 From: Paul Delafosse Date: Thu, 12 May 2022 23:20:44 +0200 Subject: [PATCH] chore: restrict Error visibility --- src/theme/error.rs | 2 +- src/theme/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/theme/error.rs b/src/theme/error.rs index 06203ac..732654c 100644 --- a/src/theme/error.rs +++ b/src/theme/error.rs @@ -3,7 +3,7 @@ use std::path::PathBuf; use thiserror::Error; #[derive(Error, Debug)] -pub enum ThemeError { +pub(crate) enum ThemeError { #[error("No 'index.theme' file for {0}")] ThemeIndexNotFound(PathBuf), #[error("IoError: {0}")] diff --git a/src/theme/mod.rs b/src/theme/mod.rs index 022d452..84b0430 100644 --- a/src/theme/mod.rs +++ b/src/theme/mod.rs @@ -86,7 +86,7 @@ pub(super) fn try_build_icon_path>(name: &str, path: P) -> Option } // Iter through the base paths and get all theme directories -pub fn get_all_themes() -> Result> { +pub(super) fn get_all_themes() -> Result> { let mut icon_themes = BTreeMap::new(); for theme_base_dir in BASE_PATHS.iter() { for entry in theme_base_dir.read_dir()? {