Radish alpha
r
rad:z39mP9rQAaGmERfUMPULfPUi473tY
Radicle terminal user interface
Radicle
Git
bin/ui: Fix cargo fmt check
Erik Kundt committed 8 months ago
commit 981056ced961969bcfff4d775b76d4c011b322e0
parent 7c7c527
1 file changed +29 -10
modified bin/ui/items.rs
@@ -390,11 +390,15 @@ impl Filter<NotificationItem> for NotificationItemFilter {
            None => true,
        };

-
        let matches_authors = if !self.authors.is_empty() { {
+
        let matches_authors = if !self.authors.is_empty() {
+
            {
                self.authors
                    .iter()
                    .any(|other| notif.author.nid == Some(**other))
-
            } } else { true };
+
            }
+
        } else {
+
            true
+
        };

        let matches_search = match &self.search {
            Some(search) => {
@@ -611,16 +615,24 @@ impl Filter<IssueItem> for IssueItemFilter {
            true
        };

-
        let matches_authors = if !self.authors.is_empty() { {
+
        let matches_authors = if !self.authors.is_empty() {
+
            {
                self.authors
                    .iter()
                    .any(|other| issue.author.nid == Some(**other))
-
            } } else { true };
+
            }
+
        } else {
+
            true
+
        };

-
        let matches_assigned = if self
-
            .assigned { issue.assignees.iter().any(|assignee| assignee.you) } else { true };
+
        let matches_assigned = if self.assigned {
+
            issue.assignees.iter().any(|assignee| assignee.you)
+
        } else {
+
            true
+
        };

-
        let matches_assignees = if !self.assignees.is_empty() { {
+
        let matches_assignees = if !self.assignees.is_empty() {
+
            {
                self.assignees.iter().any(|other| {
                    issue
                        .assignees
@@ -629,7 +641,10 @@ impl Filter<IssueItem> for IssueItemFilter {
                        .collect::<Vec<_>>()
                        .contains(other)
                })
-
            } } else { true };
+
            }
+
        } else {
+
            true
+
        };

        let matches_search = match &self.search {
            Some(search) => match matcher.fuzzy_match(&issue.title, search) {
@@ -852,11 +867,15 @@ impl Filter<PatchItem> for PatchItemFilter {
            true
        };

-
        let matches_authors = if !self.authors.is_empty() { {
+
        let matches_authors = if !self.authors.is_empty() {
+
            {
                self.authors
                    .iter()
                    .any(|other| patch.author.nid == Some(**other))
-
            } } else { true };
+
            }
+
        } else {
+
            true
+
        };

        let matches_search = match &self.search {
            Some(search) => match matcher.fuzzy_match(&patch.title, search) {