Skip to content

Commit c45b7e4

Browse files
committed
editoast: increase the availability of the API
This is just good practice to make the API takes `&[]` instead of `&Vec<>`.
1 parent 5f9aed7 commit c45b7e4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

editoast/src/infra_cache/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ impl InfraCache {
556556
}
557557

558558
/// Apply an operation to the infra cache
559-
pub fn apply_operations(&mut self, operations: &Vec<CacheOperation>) -> Result<()> {
559+
pub fn apply_operations(&mut self, operations: &[CacheOperation]) -> Result<()> {
560560
for op_res in operations {
561561
match op_res {
562562
CacheOperation::Delete(obj_ref) => self.apply_delete(obj_ref)?,

editoast/src/views/infra/auto_fixes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async fn fix_infra(infra_cache: &mut InfraCache) -> Result<Vec<Operation>> {
9393
CacheOperation::Delete(delete_operation.clone().into())
9494
}
9595
})
96-
.collect();
96+
.collect::<Vec<_>>();
9797
infra_cache
9898
.apply_operations(&cache_operations)
9999
.map_err(|source| AutoFixesEditoastError::FixTrialFailure { source })?;

0 commit comments

Comments
 (0)