diff options
| author | Ubuntu <github@matdoes.dev> | 2022-04-23 04:28:19 +0000 |
|---|---|---|
| committer | Ubuntu <github@matdoes.dev> | 2022-04-23 04:28:19 +0000 |
| commit | 7a272c216bb69e6e720ba420372cdffce13413e1 (patch) | |
| tree | 6da1aa85536be7707b5585883f5493d621a681c5 /azalea-nbt/src | |
| parent | 46454793e041dcecb252084b6616bd8f7011b2e1 (diff) | |
| download | azalea-drasl-7a272c216bb69e6e720ba420372cdffce13413e1.tar.xz | |
Vec<Tag> to [Tag]
Diffstat (limited to 'azalea-nbt/src')
| -rwxr-xr-x | azalea-nbt/src/encode.rs | 2 | ||||
| -rwxr-xr-x | azalea-nbt/src/tag.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/azalea-nbt/src/encode.rs b/azalea-nbt/src/encode.rs index 08d41e89..c765d4a7 100755 --- a/azalea-nbt/src/encode.rs +++ b/azalea-nbt/src/encode.rs @@ -102,7 +102,7 @@ fn write_compound( } #[inline] -fn write_list(writer: &mut dyn Write, value: &Vec<Tag>) -> Result<(), Error> { +fn write_list(writer: &mut dyn Write, value: &[Tag]) -> Result<(), Error> { // we just get the type from the first item, or default the type to END if value.is_empty() { writer.write_all(&[0; 5])?; diff --git a/azalea-nbt/src/tag.rs b/azalea-nbt/src/tag.rs index f8960aa6..61bd15ba 100755 --- a/azalea-nbt/src/tag.rs +++ b/azalea-nbt/src/tag.rs @@ -137,7 +137,7 @@ impl Tag { } #[inline] - pub fn as_list(&self) -> Option<&Vec<Tag>> { + pub fn as_list(&self) -> Option<&[Tag]> { if let Tag::List(v) = self { Some(v) } else { |
