fix(server,docs): correct ShimFn return type in README#228
Merged
Conversation
The CommandMetadata code block in telepath-server/README.md showed the ShimFn return type as `Result<usize, DispatchError>`, but the actual type alias in src/lib.rs returns `Result<DispatchOutcome, DispatchError>`. This fixes the doc/source mismatch so readers integrating against CommandMetadata see the correct shim signature. References: - telepath-server/src/lib.rs:71-75 (canonical ShimFn definition)
There was a problem hiding this comment.
Pull request overview
Updates telepath-server documentation to reflect the current, canonical ShimFn return type used by CommandMetadata, aligning the README example with telepath-server/src/lib.rs after the DispatchOutcome refactor.
Changes:
- Correct the inline
ShimFnsignature comment in theCommandMetadataexample to returnResult<DispatchOutcome, DispatchError>.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
CommandMetadataexample block intelepath-server/README.mddocumentedinvoke: ShimFnwith the commentResult<usize, DispatchError>, but the canonical type alias intelepath-server/src/lib.rs:71-75returnsResult<DispatchOutcome, DispatchError>. This was a stale comment from before theDispatchOutcomerefactor and could confuse readers integrating directly againstCommandMetadata.Key Changes
telepath-server/README.md: update the inline comment to match the actualShimFnsignature.Test plan
cargo fmt --all -- --check(pre-commit hook)just clippy+just test(pre-push hook)Format check,Host (clippy + test + smoke),Tools (telepath CLI clippy + tests),MSRV (1.88),Firmware (cross-compile nRF52840-DK)References
telepath-server/src/lib.rs:71-75— canonicalShimFntype aliastelepath-macros/src/lib.rs:62-63— generated shim signature (already correct)🤖 Generated with Claude Code