From b63324860647b4642c6e05008f8b6a5bf0a7865f Mon Sep 17 00:00:00 2001 From: David Knaack Date: Fri, 2 Oct 2020 19:10:46 +0200 Subject: [PATCH] fix(readonly): change module to match docs (#1728) --- src/configs/directory.rs | 8 ++++---- src/modules/directory.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/configs/directory.rs b/src/configs/directory.rs index fe414001..9adb0bc3 100644 --- a/src/configs/directory.rs +++ b/src/configs/directory.rs @@ -13,8 +13,8 @@ pub struct DirectoryConfig<'a> { pub format: &'a str, pub style: &'a str, pub disabled: bool, - pub read_only_symbol: &'a str, - pub read_only_symbol_style: &'a str, + pub read_only: &'a str, + pub read_only_style: &'a str, } impl<'a> RootModuleConfig<'a> for DirectoryConfig<'a> { @@ -28,8 +28,8 @@ impl<'a> RootModuleConfig<'a> for DirectoryConfig<'a> { format: "[$path]($style)[$read_only]($read_only_style) ", style: "cyan bold", disabled: false, - read_only_symbol: "🔒", - read_only_symbol_style: "red", + read_only: "🔒", + read_only_style: "red", } } } diff --git a/src/modules/directory.rs b/src/modules/directory.rs index 39048024..783a61f2 100644 --- a/src/modules/directory.rs +++ b/src/modules/directory.rs @@ -97,13 +97,13 @@ pub fn module<'a>(context: &'a Context) -> Option> { String::from("") }; let final_dir_string = format!("{}{}", fish_prefix, truncated_dir_string); - let lock_symbol = String::from(config.read_only_symbol); + let lock_symbol = String::from(config.read_only); let parsed = StringFormatter::new(config.format).and_then(|formatter| { formatter .map_style(|variable| match variable { "style" => Some(Ok(config.style)), - "read_only_style" => Some(Ok(config.read_only_symbol_style)), + "read_only_style" => Some(Ok(config.read_only_style)), _ => None, }) .map(|variable| match variable {