Skip to content

Commit

Permalink
chore: update TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryConrad committed Jul 2, 2023
1 parent 91fc15e commit 55f7b69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
5 changes: 2 additions & 3 deletions rearch/src/capsule_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ use std::any::TypeId;
use crate::{Capsule, ContainerWriteTxn};

/// Allows you to read the current data of capsules based on the given state of the container txn.
// TODO switch this to an Enum of Actual/Mock and don't need mock feature
// TODO mock utility, like MockCapsuleReaderBuilder::new().set(capsule, value).set(...).build()
pub struct CapsuleReader<'scope, 'total> {
id: TypeId,
txn: &'scope mut ContainerWriteTxn<'total>,
// TODO mock utility, like MockCapsuleReaderBuilder::new().set(capsule, value).set(...).build()
// #[cfg(feature = "capsule-reader-mock")]
// mock: Option<CapsuleMocks>,
}

impl<'scope, 'total> CapsuleReader<'scope, 'total> {
Expand Down
12 changes: 0 additions & 12 deletions rearch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,6 @@ fn sync_persist<Read, Write, R, T>(read: Read, write: Write) {
*/
// TODO attempt to see if we can rewrite SideEffectRebuilder without Box<dyn> with new approach
// (but keep the Box<dyn FnOnce(...)> inner part the same)
// TODO these next two require generic closures, perhaps ask about them again.
// https://github.com/rust-lang/rfcs/pull/1650
// https://github.com/rust-lang/rust/issues/97362
// TODO side effect registrar can also be a type alias to Box<dyn Fn(SideEffect)>,
// and backwards compat can be maintained completely if we provide mock-creating API
// (because tuple side effect will always be treated as one)
// because ideally, registrar should be var-args.
// benchmark before and after so we don't make a bad time trade off
// TODO Consider turning CapsuleReader into type alias for Box<dyn Fn()>
// for easy mocking and also easy read
// Either that or do the mocking feature thing
// benchmark before and after so we don't make a bad time trade off
// TODO capsule macro
// TODO side effect macro to remove the `move |register| {}` boilerplate
// TODO aggressive garbage collection mode
Expand Down

0 comments on commit 55f7b69

Please sign in to comment.