summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCyborus <87248184+Cyborus04@users.noreply.github.com>2023-11-13 23:22:23 +0100
committerCyborus <87248184+Cyborus04@users.noreply.github.com>2023-11-13 23:22:23 +0100
commit9da230e5eedf00ff49f2ff2be0429667c5a61e9b (patch)
tree96664d5741405ec5c5202d14c75fafe34a55e0ce /src
parentsupport getting, deleting, and patching issues (diff)
downloadforgejo-api-9da230e5eedf00ff49f2ff2be0429667c5a61e9b.tar.xz
forgejo-api-9da230e5eedf00ff49f2ff2be0429667c5a61e9b.zip
methods do not need to take `&mut self`
Diffstat (limited to 'src')
-rw-r--r--src/issue.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/issue.rs b/src/issue.rs
index b930216..66c04ed 100644
--- a/src/issue.rs
+++ b/src/issue.rs
@@ -1,23 +1,23 @@
use super::*;
impl Forgejo {
- pub async fn get_repo_issues(&mut self, owner: &str, repo: &str, query: IssueQuery) -> Result<Vec<Issue>, ForgejoError> {
+ pub async fn get_repo_issues(&self, owner: &str, repo: &str, query: IssueQuery) -> Result<Vec<Issue>, ForgejoError> {
self.get(&query.to_string(owner, repo)).await
}
- pub async fn create_issue(&mut self, owner: &str, repo: &str, opts: CreateIssueOption) -> Result<Issue, ForgejoError> {
+ pub async fn create_issue(&self, owner: &str, repo: &str, opts: CreateIssueOption) -> Result<Issue, ForgejoError> {
self.post(&format!("/repos/{owner}/{repo}/issues"), &opts).await
}
- pub async fn get_issue(&mut self, owner: &str, repo: &str, id: u64) -> Result<Option<Issue>, ForgejoError> {
+ pub async fn get_issue(&self, owner: &str, repo: &str, id: u64) -> Result<Option<Issue>, ForgejoError> {
self.get_opt(&format!("/repos/{owner}/{repo}/issues/{id}")).await
}
- pub async fn delete_issue(&mut self, owner: &str, repo: &str, id: u64) -> Result<(), ForgejoError> {
+ pub async fn delete_issue(&self, owner: &str, repo: &str, id: u64) -> Result<(), ForgejoError> {
self.delete(&format!("/repos/{owner}/{repo}/issues/{id}")).await
}
- pub async fn edit_issue(&mut self, owner: &str, repo: &str, id: u64, opts: EditIssueOption) -> Result<(), ForgejoError> {
+ pub async fn edit_issue(&self, owner: &str, repo: &str, id: u64, opts: EditIssueOption) -> Result<(), ForgejoError> {
self.patch(&format!("/repos/{owner}/{repo}/issues/{id}"), &opts).await
}
}