mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 15:27:28 +00:00
[Protocol] Remove Minecraft unused function to convert a string to bytes
This commit is contained in:
parent
f50c50f0f1
commit
7e028ce97d
1 changed files with 0 additions and 8 deletions
|
|
@ -238,11 +238,3 @@ pub(crate) fn get_string<B: ByteOrder>(buffer: &mut Buffer<B>) -> GDResult<Strin
|
|||
|
||||
String::from_utf8(text).map_err(|e| PacketBad.context(e))
|
||||
}
|
||||
|
||||
#[allow(dead_code)] // TODO! Look if this is needed anymore
|
||||
pub(crate) fn as_string(value: &str) -> Vec<u8> {
|
||||
let mut buf = as_varint(value.len() as i32);
|
||||
buf.extend(value.as_bytes());
|
||||
|
||||
buf
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue