mirror of
https://github.com/mat-1/azalea.git
synced 2024-09-19 22:52:32 +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]
|
||||
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])?;
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue