Skip to content

Fix bincode::Decode bound compilation errors #31

@coderabbitai

Description

@coderabbitai

Problem

The codebase currently uses incorrect type bounds for bincode::Decode which prevents compilation with bincode 2.x. The constraint bincode::Decode<()> is incorrect as Decode is parametrised over a lifetime, not an arbitrary type.

Affected Locations

This issue affects multiple locations in the codebase:

  • Lines 28-31 in src/server.rs
  • Lines 95-97 in src/server.rs
  • Lines 326-329 in src/server.rs
  • Lines 357-359 in src/server.rs

The incorrect bound appears in struct definitions, method signatures (with_preamble, worker_task, process_stream, etc.).

Context

This compilation issue was identified during code review and has been pointed out in earlier reviews but has not yet been addressed. The correct bound should use higher-ranked trait bounds with lifetimes.

References

Reported by: @leynos

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions