Reformat code
This commit is contained in:
1 parent
2fc58fcc2d
commit
29a90d48d9
8 files changed
+26
-33
No files matched your search
@@ -320,7 +320,8 @@ impl<T: EntityData + Clone, D: DbLayer<T>> Repository<T, D> for DataRepositoryIn
|
||||
}
|
||||
|
||||
fn create_now(&mut self, mut new: T) -> Result<EntityHandle<T>, NotificationData> {
|
||||
self.data_layer.add_entity(&mut new, &self.connection.read())?;
|
||||
self.data_layer
|
||||
.add_entity(&mut new, &self.connection.read())?;
|
||||
let index = self.cache.len();
|
||||
let handle = EntityHandle::new(new.id(), index, true);
|
||||
self.cache.push(new);
|
||||
@@ -378,7 +379,7 @@ impl<T: EntityData + Clone, D: DbLayer<T>> Repository<T, D> for DataRepositoryIn
|
||||
|
||||
fn start(&mut self) -> MaybeError {
|
||||
if self.version != 0 {
|
||||
return Ok(())
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
self.init()?;
|
||||
|
||||
Reference in new issue
Block a user