From 74373aebcfdfcf5c03e4fb6510d8dd664a0b9b88 Mon Sep 17 00:00:00 2001 From: Trinity Pointard Date: Tue, 6 Apr 2021 05:25:28 +0200 Subject: make most requested changes --- src/model/block.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/model/block.rs') diff --git a/src/model/block.rs b/src/model/block.rs index 38b2325c..89685630 100644 --- a/src/model/block.rs +++ b/src/model/block.rs @@ -157,7 +157,7 @@ impl BlockManager { } /// Write a block to disk - pub async fn write_block(&self, hash: &Hash, data: &[u8]) -> Result { + async fn write_block(&self, hash: &Hash, data: &[u8]) -> Result { let _lock = self.data_dir_lock.lock().await; let mut path = self.block_dir(hash); @@ -176,7 +176,7 @@ impl BlockManager { } /// Read block from disk, verifying it's integrity - pub async fn read_block(&self, hash: &Hash) -> Result { + async fn read_block(&self, hash: &Hash) -> Result { let path = self.block_path(hash); let mut f = match fs::File::open(&path).await { @@ -208,7 +208,7 @@ impl BlockManager { } /// Check if this node should have a block, but don't actually have it - pub async fn need_block(&self, hash: &Hash) -> Result { + async fn need_block(&self, hash: &Hash) -> Result { let needed = self .rc .get(hash.as_ref())? -- cgit v1.2.3