Skip to content

Commit 8fe612b

Browse files
committed
refactor: remove Result from process_entrypoints
This function can't fail, so we can remove the Result.
1 parent 1dc3dc5 commit 8fe612b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

tycho-client/src/feed/component_tracker.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ where
272272
}
273273

274274
/// Updates the tracked entrypoints and contracts based on the given DCI data.
275-
pub fn process_entrypoints(&mut self, dci_update: &DCIUpdate) -> Result<(), RPCError> {
275+
pub fn process_entrypoints(&mut self, dci_update: &DCIUpdate) {
276276
// Update detected contracts for entrypoints
277277
for (entrypoint, traces) in &dci_update.trace_results {
278278
self.entrypoints
@@ -303,8 +303,6 @@ where
303303
}
304304
}
305305
}
306-
307-
Ok(())
308306
}
309307

310308
/// Get related contracts for the given component ids. Assumes that the components are already

tycho-client/src/feed/synchronizer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ where
288288
4,
289289
)
290290
.await?;
291-
tracked_components.process_entrypoints(&result.clone().into())?;
291+
tracked_components.process_entrypoints(&result.clone().into());
292292
Some(result)
293293
} else {
294294
None
@@ -521,7 +521,7 @@ where
521521
};
522522

523523
// 3. Update entrypoints on the tracker (affects which contracts are tracked)
524-
tracker.process_entrypoints(&deltas.dci_update)?;
524+
tracker.process_entrypoints(&deltas.dci_update);
525525

526526
// 4. Filter deltas by currently tracked components / contracts
527527
self.filter_deltas(&mut deltas, &tracker);

0 commit comments

Comments
 (0)