diff options
author | Trinity Pointard <trinity.pointard@gmail.com> | 2021-04-06 05:25:28 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-04-27 16:47:08 +0200 |
commit | 74373aebcfdfcf5c03e4fb6510d8dd664a0b9b88 (patch) | |
tree | d33d89915de29eb69e1b527c686f26358fcd2b45 /src/model/block.rs | |
parent | 16300bbd89235dfb5852413cd451535559664594 (diff) | |
download | garage-74373aebcfdfcf5c03e4fb6510d8dd664a0b9b88.tar.gz garage-74373aebcfdfcf5c03e4fb6510d8dd664a0b9b88.zip |
make most requested changes
Diffstat (limited to 'src/model/block.rs')
-rw-r--r-- | src/model/block.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<Message, Error> { + async fn write_block(&self, hash: &Hash, data: &[u8]) -> Result<Message, Error> { 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<Message, Error> { + async fn read_block(&self, hash: &Hash) -> Result<Message, Error> { 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<bool, Error> { + async fn need_block(&self, hash: &Hash) -> Result<bool, Error> { let needed = self .rc .get(hash.as_ref())? |