Update version of bytes
This commit is contained in:
parent
08e8b1311f
commit
17427be5ef
3 changed files with 5 additions and 5 deletions
|
@ -4,7 +4,7 @@ version = "0.1.0"
|
|||
authors = ["Tangent 128 <Tangent128@gmail.com>"]
|
||||
|
||||
[dependencies]
|
||||
bytes = "0.4"
|
||||
bytes = "0.4.10"
|
||||
clap = "2.31.2"
|
||||
futures = "0.1.20"
|
||||
http = "0.1"
|
||||
|
|
|
@ -169,7 +169,7 @@ pub fn encode_varint<T: Write>(varint: Varint, output: &mut T) -> IoResult<()> {
|
|||
};
|
||||
|
||||
let mut buffer = Cursor::new([0; 8]);
|
||||
buffer.put_uint::<BigEndian>(number, size);
|
||||
buffer.put_uint_be(number, size);
|
||||
|
||||
return output.write_all(&buffer.get_ref()[..size]);
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ pub fn encode_varint_4<T: Write>(varint: Varint, output: &mut T) -> IoResult<()>
|
|||
};
|
||||
|
||||
let mut buffer = Cursor::new([0; 4]);
|
||||
buffer.put_u32::<BigEndian>(number as u32);
|
||||
buffer.put_u32_be(number as u32);
|
||||
|
||||
output.write_all(&buffer.get_ref()[..])
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ pub fn encode_integer<T: Write>(tag: u64, value: u64, output: &mut T) -> IoResul
|
|||
encode_tag_header(tag, Varint::Value(8), output)?;
|
||||
|
||||
let mut buffer = Cursor::new([0; 8]);
|
||||
buffer.put_u64::<BigEndian>(value);
|
||||
buffer.put_u64_be(value);
|
||||
|
||||
output.write_all(&buffer.get_ref()[..])
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ pub fn encode_simple_block<T: Write>(block: SimpleBlock, output: &mut T) -> IoRe
|
|||
encode_varint(Varint::Value(track), output)?;
|
||||
|
||||
let mut buffer = Cursor::new([0; 3]);
|
||||
buffer.put_i16::<BigEndian>(timecode);
|
||||
buffer.put_i16_be(timecode);
|
||||
buffer.put_u8(flags);
|
||||
|
||||
output.write_all(&buffer.get_ref()[..])?;
|
||||
|
|
Loading…
Reference in a new issue