From a1b41542b8274d9d17d4da03b111d3b4a80f1576 Mon Sep 17 00:00:00 2001 From: Fintan Halpenny Date: Thu, 8 Feb 2024 15:55:30 +0000 Subject: [PATCH] radicle: rename resolved to is_resolved The standard in the codebase for boolean methods is to prefix them with `is_`. Change `resolved` to `is_resolved`. Signed-off-by: Fintan Halpenny X-Clacks-Overhead: GNU Terry Pratchett --- radicle-httpd/src/api/json.rs | 6 +++--- radicle/src/cob/thread.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/radicle-httpd/src/api/json.rs b/radicle-httpd/src/api/json.rs index 0902cdae..ab955e20 100644 --- a/radicle-httpd/src/api/json.rs +++ b/radicle-httpd/src/api/json.rs @@ -213,7 +213,7 @@ fn issue_comment(id: &CommentId, comment: &Comment, aliases: &impl AliasStore) - ).collect::>(), "timestamp": comment.timestamp().as_secs(), "replyTo": comment.reply_to(), - "resolved": comment.resolved(), + "resolved": comment.is_resolved(), }) } @@ -235,7 +235,7 @@ fn patch_comment( "timestamp": comment.timestamp().as_secs(), "replyTo": comment.reply_to(), "location": comment.location(), - "resolved": comment.resolved(), + "resolved": comment.is_resolved(), }) } @@ -257,7 +257,7 @@ fn review_comment( "timestamp": comment.timestamp().as_secs(), "replyTo": comment.reply_to(), "location": comment.location(), - "resolved": comment.resolved(), + "resolved": comment.is_resolved(), }) } diff --git a/radicle/src/cob/thread.rs b/radicle/src/cob/thread.rs index 0ed50d4d..ff3c78ea 100644 --- a/radicle/src/cob/thread.rs +++ b/radicle/src/cob/thread.rs @@ -211,7 +211,7 @@ impl Comment { } /// Get comment resolution status. - pub fn resolved(&self) -> bool { + pub fn is_resolved(&self) -> bool { self.resolved }