Skip to content

Commit b5353c4

Browse files
committed
Add TODO notes
1 parent d552e3e commit b5353c4

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/backends/mock_main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,8 @@ impl MainPod for MockMainPod {
408408
.is_some();
409409
// check that all `input_statements` of type `ValueOf` with origin=SELF have unique keys
410410
// (no duplicates)
411+
// TODO: Instead of doing this, do a uniqueness check when verifying the output of a
412+
// `NewValue` operation.
411413
let value_ofs_unique = {
412414
let key_id_pairs = input_statements
413415
.into_iter()

src/middleware.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ impl ToFields for StatementArg {
377377
}
378378
}
379379

380+
// TODO: Replace this with a more stringly typed enum as in the Devcon implementation.
380381
#[derive(Clone, Debug, PartialEq, Eq)]
381382
pub struct Statement(pub NativeStatement, pub Vec<StatementArg>);
382383

@@ -471,6 +472,7 @@ impl OperationArg {
471472
}
472473
}
473474

475+
// TODO: Replace this with a more stringly typed enum as in the Devcon implementation.
474476
#[derive(Clone, Debug, PartialEq, Eq)]
475477
pub struct Operation(pub NativeOperation, pub Vec<OperationArg>);
476478

@@ -482,6 +484,7 @@ impl Operation {
482484
&self.1
483485
}
484486
// TODO: Argument checking.
487+
// TODO: Use `Err` for all type mismatches rather than `false`.
485488
/// Checks the given operation against a statement.
486489
pub fn check(&self, output_statement: Statement) -> Result<bool> {
487490
use NativeOperation::*;

0 commit comments

Comments
 (0)