Skip to content

Commit

Permalink
refactor(computegraph): use is_none_or instead of map_or
Browse files Browse the repository at this point in the history
  • Loading branch information
maximmaxim345 committed Feb 22, 2025
1 parent f521b43 commit c9ab130
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/computegraph/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ impl ComputeGraph {
let mut recompute_required = if cache.is_some() {
computed_results
.get(&current_node.handle)
.map_or(true, |node_cache| {
.is_none_or(|node_cache| {
// We already computed a node with the same name, check if it changed
let is_equal = node_cache
.node
Expand Down Expand Up @@ -1421,7 +1421,7 @@ impl ComputeGraph {
if match &value {
FallbackValue::Opaque(_) => true,
FallbackValue::Cacheable(value) => {
cache.as_mut().map_or(true, |cache| {
cache.as_mut().is_none_or(|cache| {
if let Some(fb) =
cache.fallback_cache.get_mut(&input.1)
{
Expand Down

0 comments on commit c9ab130

Please sign in to comment.