Vec<Tag> to [Tag]

This commit is contained in:
Ubuntu 2022-04-23 04:28:19 +00:00
parent 46454793e0
commit 7a272c216b
2 changed files with 2 additions and 2 deletions

View file

@ -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])?;

View file

@ -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 {