mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 02:21:14 +00:00
Split out joiner.
This commit is contained in:
@@ -20,17 +20,6 @@ impl<'a> StreamReader<'a> {
|
||||
Slicable::from_slice(slice)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Joiner {
|
||||
fn join<T: Slicable + Sized>(self, value: &T) -> Self;
|
||||
}
|
||||
|
||||
impl Joiner for Vec<u8> {
|
||||
fn join<T: Slicable + Sized>(mut self, value: &T) -> Vec<u8> {
|
||||
value.as_slice_then(|s| self.extend_from_slice(s));
|
||||
self
|
||||
}
|
||||
}
|
||||
/*
|
||||
// Not in use yet
|
||||
// TODO: introduce fn size_will_be(&self) -> usize; to Slicable trait and implement
|
||||
|
||||
Reference in New Issue
Block a user