diff options
author | Trinity Pointard <trinity.pointard@gmail.com> | 2021-05-02 23:13:08 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-05-03 22:15:09 +0200 |
commit | e4b9e4e24d006373a20cfcbdac9dba5e399ee182 (patch) | |
tree | 620e24d182e6db4ad7ddca274eb8071d8241a1d6 /src/garage/admin_rpc.rs | |
parent | 6644df6b969df3f7ff0516ab7acd9b600dff0a54 (diff) | |
download | garage-e4b9e4e24d006373a20cfcbdac9dba5e399ee182.tar.gz garage-e4b9e4e24d006373a20cfcbdac9dba5e399ee182.zip |
rename types to CamelCase
Diffstat (limited to 'src/garage/admin_rpc.rs')
-rw-r--r-- | src/garage/admin_rpc.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/garage/admin_rpc.rs b/src/garage/admin_rpc.rs index dc27caae..f2d11bb3 100644 --- a/src/garage/admin_rpc.rs +++ b/src/garage/admin_rpc.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize}; use garage_util::error::Error; -use garage_table::crdt::CRDT; +use garage_table::crdt::Crdt; use garage_table::replication::*; use garage_table::*; @@ -61,7 +61,7 @@ impl AdminRpcHandler { AdminRpc::KeyOperation(ko) => self2.handle_key_cmd(ko).await, AdminRpc::LaunchRepair(opt) => self2.handle_launch_repair(opt).await, AdminRpc::Stats(opt) => self2.handle_stats(opt).await, - _ => Err(Error::BadRPC("Invalid RPC".to_string())), + _ => Err(Error::BadRpc("Invalid RPC".to_string())), } } }); @@ -88,7 +88,7 @@ impl AdminRpcHandler { let bucket = match self.garage.bucket_table.get(&EmptyKey, &query.name).await? { Some(mut bucket) => { if !bucket.is_deleted() { - return Err(Error::BadRPC(format!( + return Err(Error::BadRpc(format!( "Bucket {} already exists", query.name ))); @@ -111,10 +111,10 @@ impl AdminRpcHandler { .get_range(&query.name, None, Some(DeletedFilter::NotDeleted), 10) .await?; if !objects.is_empty() { - return Err(Error::BadRPC(format!("Bucket {} is not empty", query.name))); + return Err(Error::BadRpc(format!("Bucket {} is not empty", query.name))); } if !query.yes { - return Err(Error::BadRPC( + return Err(Error::BadRpc( "Add --yes flag to really perform this operation".to_string(), )); } @@ -223,7 +223,7 @@ impl AdminRpcHandler { KeyOperation::Delete(query) => { let key = self.get_existing_key(&query.key_pattern).await?; if !query.yes { - return Err(Error::BadRPC( + return Err(Error::BadRpc( "Add --yes flag to really perform this operation".to_string(), )); } @@ -265,7 +265,7 @@ impl AdminRpcHandler { .await? .filter(|b| !b.is_deleted()) .map(Ok) - .unwrap_or_else(|| Err(Error::BadRPC(format!("Bucket {} does not exist", bucket)))) + .unwrap_or_else(|| Err(Error::BadRpc(format!("Bucket {} does not exist", bucket)))) } async fn get_existing_key(&self, pattern: &str) -> Result<Key, Error> { @@ -342,7 +342,7 @@ impl AdminRpcHandler { async fn handle_launch_repair(self: &Arc<Self>, opt: RepairOpt) -> Result<AdminRpc, Error> { if !opt.yes { - return Err(Error::BadRPC( + return Err(Error::BadRpc( "Please provide the --yes flag to initiate repair operations.".to_string(), )); } |