remove Decode trait and only impl
This commit is contained in:
parent
74ec42e000
commit
7aa52ea97a
3 changed files with 3 additions and 7 deletions
|
|
@ -143,7 +143,7 @@ mod symbol;
|
|||
|
||||
use buffer::Buffer;
|
||||
pub use rpc::PanicMessage;
|
||||
use rpc::{Decode, DecodeMut, Encode, Reader, Writer};
|
||||
use rpc::{DecodeMut, Encode, Reader, Writer};
|
||||
|
||||
/// Configuration for establishing an active connection between a server and a
|
||||
/// client. The server creates the bridge config (`run_server` in `server.rs`),
|
||||
|
|
|
|||
|
|
@ -12,10 +12,6 @@ pub(super) trait Encode<S>: Sized {
|
|||
|
||||
pub(super) type Reader<'a> = &'a [u8];
|
||||
|
||||
pub(super) trait Decode<'a, 's, S>: Sized {
|
||||
fn decode(r: &mut Reader<'a>, s: &'s S) -> Self;
|
||||
}
|
||||
|
||||
pub(super) trait DecodeMut<'a, 's, S>: Sized {
|
||||
fn decode(r: &mut Reader<'a>, s: &'s mut S) -> Self;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ macro_rules! define_server_handles {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'s, S: Types> Decode<'_, 's, HandleStore<MarkedTypes<S>>>
|
||||
impl<'s, S: Types> DecodeMut<'_, 's, HandleStore<MarkedTypes<S>>>
|
||||
for &'s Marked<S::$oty, client::$oty>
|
||||
{
|
||||
fn decode(r: &mut Reader<'_>, s: &'s HandleStore<MarkedTypes<S>>) -> Self {
|
||||
fn decode(r: &mut Reader<'_>, s: &'s mut HandleStore<MarkedTypes<S>>) -> Self {
|
||||
&s.$oty[handle::Handle::decode(r, &mut ())]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue