mirror of
https://github.com/Astatin3/unshell.git
synced 2026-06-09 06:47:59 -06:00
Improve Rust code clarity across the workspace
Document public APIs and non-obvious control flow so the protocol, simulator, and macro crates are easier to follow. Tighten a few helper paths and feature gates while preserving behavior and keeping the workspace warning-free.
This commit is contained in:
@@ -61,6 +61,9 @@ impl ProtocolEndpoint {
|
||||
message: DataMessage,
|
||||
) -> Result<EndpointOutcome, EndpointError> {
|
||||
let hook_id = header.hook_id.expect("validated");
|
||||
// The hook host can address its hook directly with `self.path + hook_id`.
|
||||
// A non-host peer only knows the hook id it was given earlier, so it must
|
||||
// recover the host-scoped key from active state using its validated path.
|
||||
let key = self
|
||||
.hooks
|
||||
.active(&HookKey::new(self.path.clone(), hook_id))
|
||||
|
||||
Reference in New Issue
Block a user