cargo fmt
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Alex 2021-04-27 16:58:44 +02:00
parent 7ba1364c08
commit f6f0c6f515
No known key found for this signature in database
GPG key ID: EDABF9711E244EB1

View file

@ -526,15 +526,16 @@ impl BlockManager {
// If compressed data is not less than 7/8 of the size of the original data, i.e. if we
// don't gain a significant margin by compressing, then we store the plain data instead
// so that we don't lose time decompressing it on reads.
let block_data = if compressed.is_some() && compressed.as_ref().unwrap().len() < (data.len() * 7) / 8 {
BlockData::Compressed(compressed.unwrap())
} else {
BlockData::Plain(data)
};
let block_data =
if compressed.is_some() && compressed.as_ref().unwrap().len() < (data.len() * 7) / 8 {
BlockData::Compressed(compressed.unwrap())
} else {
BlockData::Plain(data)
};
let message = Message::PutBlock {
hash,
data: block_data,
hash,
data: block_data,
};
let who = self.replication.write_nodes(&hash);
self.rpc_client