Update dependencies and lints

This commit is contained in:
2026-09-07 22:31:04 -07:00
parent b518d762f1
commit 9c288d051c
79 changed files with 3473 additions and 2923 deletions
+31 -8
View File
@@ -1,25 +1,48 @@
//! TMDB collection model.
use super::id::{CollectionId, MovieId};
/// A deserialized Collection from the TMDB API
/// A deserialized Collection from the TMDB API.
#[derive(Debug, Clone, serde::Deserialize)]
#[non_exhaustive]
pub struct Collection {
/// The collection's TMDB ID
/// The collection's TMDB ID.
pub id: CollectionId,
/// The collection's title
/// The collection's title.
#[serde(rename = "name")]
pub title: String,
/// The collection's overview
/// The collection's overview.
pub overview: String,
/// The list of movies that are part of this collection
/// The list of movies that are part of this collection.
#[serde(rename = "parts")]
pub movies: Vec<Item>,
}
/// A deserialized collection item from the TMDB API
/// A deserialized collection item from the TMDB API.
#[derive(Debug, Clone, serde::Deserialize)]
#[non_exhaustive]
pub struct Item {
/// The movie's TMDB ID
/// The movie's TMDB ID.
pub id: MovieId,
/// The movie's title
/// The movie's title.
pub title: String,
}
#[cfg(test)]
mod tests {
use super::{Collection, CollectionId, Item, MovieId};
#[test]
fn use_types() {
drop(Collection {
id: CollectionId::from_raw(0),
title: String::new(),
overview: String::new(),
movies: Vec::new(),
});
drop(Item {
id: MovieId::from_raw(0),
title: String::new(),
});
}
}