Fix `WithOtherTrailing` and `WithOtherIntEncoding` (#342)

They should be Copy/Clone as the rest of the Options

Closes #341
This commit is contained in:
luben karavelov 2020-07-20 18:22:30 +01:00 committed by GitHub
parent 00c43bf3b1
commit 5a134cf991
1 changed files with 2 additions and 0 deletions

View File

@ -242,12 +242,14 @@ pub struct WithOtherEndian<O: Options, E: BincodeByteOrder> {
}
/// A configuration struct with a user-specified length encoding
#[derive(Clone, Copy)]
pub struct WithOtherIntEncoding<O: Options, I: IntEncoding> {
options: O,
_length: PhantomData<I>,
}
/// A configuration struct with a user-specified trailing bytes behavior.
#[derive(Clone, Copy)]
pub struct WithOtherTrailing<O: Options, T: TrailingBytes> {
options: O,
_trailing: PhantomData<T>,