This commit is contained in:
debris 2015-11-26 00:09:09 +01:00
parent e40bb6d52c
commit 4748ed5221
1 changed files with 2 additions and 0 deletions

View File

@ -243,6 +243,7 @@ impl RlpStream {
}
/// declare appending the list of given size
/// TODO: optimise insertion of empty list
pub fn append_list<'a>(&'a mut self, len: usize) -> &'a mut RlpStream {
// push new list
let position = self.encoder.bytes.len();
@ -356,6 +357,7 @@ impl BasicEncoder {
}
/// inserts list prefix at given position
/// TODO: optimise it, so it does not copy an array
fn insert_list_len_at_pos(&mut self, len: usize, pos: usize) -> () {
// new bytes
let mut res: Vec<u8> = vec![];