librespot/metadata/src/video.rs
Daniel M 0c69126065 Rename from_repeated_* functions to impl_*
- `from_repeated_message` -> `impl_from_repeated`
- `from_repeated_enum` -> `impl_from_repeated_copy` since the enum
  references were just simply deref copied
- `try_from_repeated_message` -> `impl_try_from_repeated`
- Simplified the implementation of `from_repeated_enum`
2022-08-02 14:21:07 +02:00

18 lines
412 B
Rust

use std::{
fmt::Debug,
ops::{Deref, DerefMut},
};
use crate::util::{impl_deref_wrapped, impl_from_repeated};
use librespot_core::FileId;
use librespot_protocol as protocol;
use protocol::metadata::VideoFile as VideoFileMessage;
#[derive(Debug, Clone, Default)]
pub struct VideoFiles(pub Vec<FileId>);
impl_deref_wrapped!(VideoFiles, Vec<FileId>);
impl_from_repeated!(VideoFileMessage, VideoFiles);