From f77db3c6f830e313a8fb08f35768db9e83f5aa8b Mon Sep 17 00:00:00 2001 From: Joscha Date: Fri, 2 May 2025 01:28:05 +0200 Subject: [PATCH] Fix some lints --- gdn/src/data/v1.rs | 2 +- gdn/src/repo.rs | 2 +- gdn/src/repo/v1.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gdn/src/data/v1.rs b/gdn/src/data/v1.rs index ed79305..402205f 100644 --- a/gdn/src/data/v1.rs +++ b/gdn/src/data/v1.rs @@ -88,7 +88,7 @@ pub fn add_repo(dir: &LockedDataDir, name: String) -> anyhow::Result { pub fn remove_repo(dir: &LockedDataDir, id: RepoId) -> anyhow::Result<()> { let mut state = load_state(dir)?; - state.repos.remove(&id).is_none(); + state.repos.remove(&id); save_state(dir, state)?; // TODO Check if this works with read-only files diff --git a/gdn/src/repo.rs b/gdn/src/repo.rs index 9a22a2f..a0c8e42 100644 --- a/gdn/src/repo.rs +++ b/gdn/src/repo.rs @@ -6,7 +6,7 @@ use std::path::Path; use anyhow::{anyhow, bail}; use git2::{ErrorCode, Repository}; -pub use self::v1::{Note, Repo, VERSION}; +pub use self::v1::{Repo, VERSION}; const VERSION_FILE: &str = "VERSION"; diff --git a/gdn/src/repo/v1.rs b/gdn/src/repo/v1.rs index f43ab55..792c85d 100644 --- a/gdn/src/repo/v1.rs +++ b/gdn/src/repo/v1.rs @@ -23,7 +23,7 @@ impl Repo { todo!() } - pub fn migrate(self) -> super::Repo { + pub fn migrate(self) -> Self { self } }