Skip to content

Conversation

GreenPenguino
Copy link
Contributor

Add the Copy and Clone traits to message decoders.

The Rust API guidelines recommend eagerly implementing common traits. Since decoders and the ReadBuf are views without mutable access into a read-only buffer, there is no harm in copying a decoder (if so, the Rust borrow checker would prevent it from compiling).

@GreenPenguino GreenPenguino force-pushed the rust-decoder-copy-clone branch from 73b772a to 7082704 Compare May 17, 2023 08:05
@GreenPenguino GreenPenguino force-pushed the rust-decoder-copy-clone branch from 7082704 to b8a0247 Compare May 17, 2023 08:07
@vyazelenko vyazelenko merged commit b4ec154 into aeron-io:master Jun 8, 2023
@GreenPenguino GreenPenguino deleted the rust-decoder-copy-clone branch June 10, 2023 05:41
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