Skip to content

fix(server,docs): correct ShimFn return type in README#228

Merged
tarotene merged 1 commit into
mainfrom
fix/server-readme-shimfn-return-type
Jun 26, 2026
Merged

fix(server,docs): correct ShimFn return type in README#228
tarotene merged 1 commit into
mainfrom
fix/server-readme-shimfn-return-type

Conversation

@tarotene

Copy link
Copy Markdown
Owner

Summary

The CommandMetadata example block in telepath-server/README.md documented invoke: ShimFn with the comment Result<usize, DispatchError>, but the canonical type alias in telepath-server/src/lib.rs:71-75 returns Result<DispatchOutcome, DispatchError>. This was a stale comment from before the DispatchOutcome refactor and could confuse readers integrating directly against CommandMetadata.

Key Changes

  • telepath-server/README.md: update the inline comment to match the actual ShimFn signature.

Test plan

  • cargo fmt --all -- --check (pre-commit hook)
  • just clippy + just test (pre-push hook)
  • CI: 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 — canonical ShimFn type alias
  • telepath-macros/src/lib.rs:62-63 — generated shim signature (already correct)

🤖 Generated with Claude Code

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)
Copilot AI review requested due to automatic review settings June 26, 2026 15:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ShimFn signature comment in the CommandMetadata example to return Result<DispatchOutcome, DispatchError>.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tarotene tarotene merged commit 99d34c7 into main Jun 26, 2026
6 checks passed
@tarotene tarotene deleted the fix/server-readme-shimfn-return-type branch June 26, 2026 15:29
@release-telepath release-telepath Bot mentioned this pull request Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants