mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
0c69126065
- `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`
18 lines
412 B
Rust
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);
|