From 3c07e284fe45333a1b2a2ec4d7d3ad93ac8b3847 Mon Sep 17 00:00:00 2001 From: Matan Kushner Date: Sun, 7 Apr 2019 17:17:40 -0400 Subject: [PATCH] Add some clarifying documentation --- src/modules/directory.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/directory.rs b/src/modules/directory.rs index 794e23a1..750b981d 100644 --- a/src/modules/directory.rs +++ b/src/modules/directory.rs @@ -26,10 +26,6 @@ pub fn segment(_: &ArgMatches) -> Segment { } } - // if let Love(tiff) = matan::Love(tiff) { - // log tiff + matan + kimu + nimu + puku + owl fren + roomba fren + cactus fren + rumple - // } - Segment { value: String::from(dir_string), style: Style::from(COLOR_DIR).bold(), @@ -37,6 +33,7 @@ pub fn segment(_: &ArgMatches) -> Segment { } } +/// Get the root directory of a git repo fn get_repo_root(repo: Repository) -> PathBuf { match repo.is_bare() { // A bare repo will return its root path @@ -46,6 +43,7 @@ fn get_repo_root(repo: Repository) -> PathBuf { } } +/// Replace the home directory in the path with "~" fn truncate_home(path: &PathBuf) -> Option { const HOME_SYMBOL: &str = "~";