From 5f96429005cd07a7ba4ab826b5e02b30eed3ad94 Mon Sep 17 00:00:00 2001 From: Fintan Halpenny Date: Tue, 28 Nov 2023 13:22:39 +0000 Subject: [PATCH] radicle: remove `WriteStorage::remove` The `remove` method is no longer being used, with `clean` taking its place. Signed-off-by: Fintan Halpenny X-Clacks-Overhead: GNU Terry Pratchett --- radicle/src/storage.rs | 7 +------ radicle/src/storage/git.rs | 4 ---- radicle/src/test/storage.rs | 4 ---- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/radicle/src/storage.rs b/radicle/src/storage.rs index 4f9ca006..afa36451 100644 --- a/radicle/src/storage.rs +++ b/radicle/src/storage.rs @@ -346,8 +346,7 @@ pub trait WriteStorage: ReadStorage { fn repository_mut(&self, rid: Id) -> Result; /// Create a read-write repository. fn create(&self, rid: Id) -> Result; - /// Delete a repository. - fn remove(&self, rid: Id) -> Result<(), Error>; + /// Delete all remote namespaces apart from the local node's and /// delegates' namespace. fn clean(&self, rid: Id) -> Result, RepositoryError>; @@ -592,10 +591,6 @@ where self.deref().create(rid) } - fn remove(&self, rid: Id) -> Result<(), Error> { - self.deref().remove(rid) - } - fn clean(&self, rid: Id) -> Result, RepositoryError> { self.deref().clean(rid) } diff --git a/radicle/src/storage/git.rs b/radicle/src/storage/git.rs index bc17abe8..a6bea04c 100644 --- a/radicle/src/storage/git.rs +++ b/radicle/src/storage/git.rs @@ -139,10 +139,6 @@ impl WriteStorage for Storage { Repository::create(paths::repository(self, &rid), rid, &self.info) } - fn remove(&self, rid: Id) -> Result<(), Error> { - self.repository(rid)?.remove() - } - fn clean(&self, rid: Id) -> Result, RepositoryError> { let repo = self.repository(rid)?; repo.clean(&self.info.key) diff --git a/radicle/src/test/storage.rs b/radicle/src/test/storage.rs index 9f9b2d8c..44224347 100644 --- a/radicle/src/test/storage.rs +++ b/radicle/src/test/storage.rs @@ -96,10 +96,6 @@ impl WriteStorage for MockStorage { todo!() } - fn remove(&self, _rid: Id) -> Result<(), Error> { - todo!() - } - fn clean(&self, _rid: Id) -> Result, RepositoryError> { todo!() }