Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions anathema-store/src/slab/shared/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ impl<I, T> Entry<I, T> {
// Try to make the entry vacant and return the value
fn try_evict(&mut self, next_id: &mut Option<I>) -> Option<T> {
// If the strong count is anything but 1, then return None
if let Entry::Occupied(value) = self {
if Arc::strong_count(value) != 1 {
return None;
}
if let Entry::Occupied(value) = self
&& Arc::strong_count(value) != 1
{
return None;
}

let mut value = Entry::Pending;
Expand Down
4 changes: 2 additions & 2 deletions anathema-widgets/src/nodes/controlflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ impl<'bp> ControlFlow<'bp> {
Change::Changed | Change::Dropped => {
let Some(el) = self.elses.get_mut(branch_id as usize) else { return };
let Some(cond) = el.cond.as_mut() else { return };
let current = cond.as_bool();
let current = cond.truthiness();
cond.reload(ctx.attribute_storage);
if cond.as_bool() != current {
if cond.truthiness() != current {
ctx.truncate_children(&mut tree);
}
}
Expand Down