refactor(core,storage): deduplicate code patterns (TODO-014)
Extract PttCapability event construction helper in events.rs. Extract ensure_dir() helper in chanora_storage. Add TODO(refactor) annotations for patterns requiring shared crate or API changes.
This commit is contained in:
@@ -187,6 +187,10 @@ fn normalize_snapshot(snapshot: ServerSnapshot) -> ServerSnapshot {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(refactor): StateEvent and Delta have mirrored variants (e.g.
|
||||
// StateEvent::ChannelChanged/ChannelDeleted vs Delta::ChannelUpserted/ChannelRemoved).
|
||||
// A proc-macro or macro_rules could generate the Delta-from-StateEvent mapping, but
|
||||
// the manual match is currently clear and the types serve different roles (input vs output).
|
||||
/// A change to the server state that the bridge should publish to
|
||||
/// Flutter. Deltas are cheap to construct and carry only the
|
||||
/// information that changed.
|
||||
|
||||
Reference in New Issue
Block a user