cargo fmt

This commit is contained in:
Alex Auvolat
2020-07-08 17:34:37 +02:00
parent 64a6eda0d2
commit 44dba0e53c
9 changed files with 209 additions and 186 deletions
+10 -13
View File
@@ -14,8 +14,8 @@ use garage_rpc::membership::{Ring, System};
use garage_rpc::rpc_client::*;
use garage_rpc::rpc_server::*;
use crate::table_sync::*;
use crate::schema::*;
use crate::table_sync::*;
const TABLE_RPC_TIMEOUT: Duration = Duration::from_secs(10);
@@ -48,7 +48,6 @@ pub enum TableRPC<F: TableSchema> {
impl<F: TableSchema> RpcMessage for TableRPC<F> {}
pub trait TableReplication: Send + Sync {
// See examples in table_sharded.rs and table_fullcopy.rs
// To understand various replication methods
@@ -456,15 +455,13 @@ where
ret
}
fn decode_entry(bytes: &[u8]) -> Result<F::E, Error> {
match rmp_serde::decode::from_read_ref::<_, F::E>(bytes) {
Ok(x) => Ok(x),
Err(e) => {
match F::try_migrate(bytes) {
Some(x) => Ok(x),
None => Err(e.into()),
}
}
}
}
fn decode_entry(bytes: &[u8]) -> Result<F::E, Error> {
match rmp_serde::decode::from_read_ref::<_, F::E>(bytes) {
Ok(x) => Ok(x),
Err(e) => match F::try_migrate(bytes) {
Some(x) => Ok(x),
None => Err(e.into()),
},
}
}
}