diff --git a/src/issue.rs b/src/issue.rs index 4d82deb..6f5889e 100644 --- a/src/issue.rs +++ b/src/issue.rs @@ -143,6 +143,7 @@ impl Issue { .filter(|s| s.len() > 0) .map(|tag| String::from(tag.trim())) .collect(); + tags.sort(); } else if file_name == "comments" && direntry.metadata()?.is_dir() { Self::read_comments(&mut comments, &direntry.path())?; } else { @@ -562,9 +563,9 @@ mod tests { .with_timezone(&chrono::Local), done_time: None, tags: Vec::::from([ - String::from("tag1"), String::from("TAG2"), String::from("i-am-also-a-tag"), + String::from("tag1"), ]), state: State::New, dependencies: None, diff --git a/src/issues.rs b/src/issues.rs index 7c43e43..fc182e7 100644 --- a/src/issues.rs +++ b/src/issues.rs @@ -127,9 +127,9 @@ mod tests { .with_timezone(&chrono::Local), done_time: None, tags: Vec::::from([ - String::from("tag1"), String::from("TAG2"), - String::from("i-am-also-a-tag") + String::from("i-am-also-a-tag"), + String::from("tag1"), ]), state: crate::issue::State::New, dependencies: None,