diff options
Diffstat (limited to 'azalea-protocol/src/mc_buf')
| -rwxr-xr-x | azalea-protocol/src/mc_buf/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/azalea-protocol/src/mc_buf/mod.rs b/azalea-protocol/src/mc_buf/mod.rs index 4048bae7..d50817fb 100755 --- a/azalea-protocol/src/mc_buf/mod.rs +++ b/azalea-protocol/src/mc_buf/mod.rs @@ -32,6 +32,12 @@ impl From<Vec<u8>> for UnsizedByteArray { } } +impl From<&str> for UnsizedByteArray { + fn from(s: &str) -> Self { + Self(s.as_bytes().to_vec()) + } +} + /// Represents Java's BitSet, a list of bits. #[derive(Debug, Clone, PartialEq, Eq, Hash, McBufReadable, McBufWritable)] pub struct BitSet { |
