Skip to content

Commit

Permalink
Merge branch 'feature/cell-context'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexagon committed Sep 25, 2023
2 parents 6b87f11 + 7c2c742 commit 4023d1a
Show file tree
Hide file tree
Showing 4 changed files with 421 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cell/cell_impl/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl TryAsMut<DynCell> for Cell {
}

/// Empty context for single-threaded cells.
#[derive(Default, Clone, Copy)]
#[derive(Debug, Default, Clone, Copy)]
pub struct EmptyCellContext;

impl CellContext for EmptyCellContext {
Expand Down
2 changes: 1 addition & 1 deletion src/cell/cell_impl/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl TryAsMut<DynCell> for Cell {
}

/// Empty context for thread-safe cells.
#[derive(Default, Clone, Copy)]
#[derive(Debug, Default, Clone, Copy)]
pub struct EmptyCellContext;

impl CellContext for EmptyCellContext {
Expand Down
3 changes: 2 additions & 1 deletion src/dict/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,9 @@ pub fn dict_insert_owned(
std::cmp::Ordering::Equal => {
// Check if we can replace the value
if !mode.can_replace() {
// TODO: change mode to `LoadMode::Noop` if copy-on-write for libraries is not ok.
let value = (
ok!(stack_or_last(&stack, &root, context, LoadMode::Full)),
ok!(stack_or_last(&stack, &root, context, LoadMode::Resolve)),
remaining_data.range(),
);
// TODO: what is the desired behavior for root as a library?
Expand Down
Loading

0 comments on commit 4023d1a

Please sign in to comment.