fix clippy warnings on model

This commit is contained in:
Trinity Pointard
2021-04-23 21:57:32 +02:00
committed by Alex Auvolat
parent f5a0cf0414
commit 4a1e079e8f
5 changed files with 38 additions and 38 deletions
+13 -7
View File
@@ -49,13 +49,6 @@ pub struct BucketParams {
pub website: crdt::LWW<bool>,
}
impl CRDT for BucketParams {
fn merge(&mut self, o: &Self) {
self.authorized_keys.merge(&o.authorized_keys);
self.website.merge(&o.website);
}
}
impl BucketParams {
/// Create an empty BucketParams with no authorized keys and no website accesss
pub fn new() -> Self {
@@ -66,6 +59,19 @@ impl BucketParams {
}
}
impl CRDT for BucketParams {
fn merge(&mut self, o: &Self) {
self.authorized_keys.merge(&o.authorized_keys);
self.website.merge(&o.website);
}
}
impl Default for BucketParams {
fn default() -> Self {
Self::new()
}
}
impl Bucket {
/// Initializes a new instance of the Bucket struct
pub fn new(name: String) -> Self {