mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
Vec<Tag> to [Tag]
This commit is contained in:
parent
46454793e0
commit
7a272c216b
2 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ fn write_compound(
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[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
|
// we just get the type from the first item, or default the type to END
|
||||||
if value.is_empty() {
|
if value.is_empty() {
|
||||||
writer.write_all(&[0; 5])?;
|
writer.write_all(&[0; 5])?;
|
||||||
|
|
|
@ -137,7 +137,7 @@ impl Tag {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn as_list(&self) -> Option<&Vec<Tag>> {
|
pub fn as_list(&self) -> Option<&[Tag]> {
|
||||||
if let Tag::List(v) = self {
|
if let Tag::List(v) = self {
|
||||||
Some(v)
|
Some(v)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue