From 6d40b03fbf816b3cd9d02ba727b6da5d34dcd535 Mon Sep 17 00:00:00 2001 From: Thomas Eppers Date: Wed, 3 Nov 2021 17:08:30 +0100 Subject: [PATCH] added more comments --- src/widget/tag_list.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/widget/tag_list.rs b/src/widget/tag_list.rs index 5f86b4d..789aac4 100644 --- a/src/widget/tag_list.rs +++ b/src/widget/tag_list.rs @@ -45,6 +45,7 @@ pub struct TagList { } impl TagList { + /// shows a text in the list and no tags pub fn with_status(status: &str) -> Self { Self { lines: vec![Line::Status(String::from(status))], @@ -53,6 +54,7 @@ impl TagList { } } + /// list the tags of the repository if the input is valid pub fn with_repo_name(repo: String) -> Self { match repository::Repo::new(&repo) { Ok(tags) => Self::with_tags(tags), @@ -60,7 +62,8 @@ impl TagList { } } - pub fn with_tags(mut tags: repository::Repo) -> Self { + /// list the tags of the input + fn with_tags(mut tags: repository::Repo) -> Self { let mut lines: Vec = tags .get_tags() .iter()