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
+33 -9
View File
@@ -1,26 +1,29 @@
//! TMDB show model.
use chrono::NaiveDate;
use super::id::ShowId;
/// A deserialized Show from the TMDB API
/// A deserialized Show from the TMDB API.
#[derive(Debug, Clone, serde::Deserialize)]
#[non_exhaustive]
pub struct Show {
/// The show's TMDB ID
/// The show's TMDB ID.
pub id: ShowId,
/// The show's title
/// The show's title.
#[serde(rename = "name")]
pub title: String,
/// The show's tagline
/// The show's tagline.
pub tagline: String,
/// The show's overview
/// The show's overview.
pub overview: String,
/// The show's first air date
/// The show's first air date.
pub first_air_date: NaiveDate,
/// The show's last air date
/// The show's last air date.
pub last_air_date: NaiveDate,
/// The total number of episodes in this show
/// The total number of episodes in this show.
pub number_of_episodes: u32,
/// The number of seasons in this show
/// The number of seasons in this show.
pub number_of_seasons: u32,
}
@@ -35,3 +38,24 @@ pub struct Show {
// TODO: Company
// pub companies: Vec<Company>
// where: struct Company { id, name }
#[cfg(test)]
mod tests {
use chrono::NaiveDate;
use super::{Show, ShowId};
#[test]
fn use_types() {
drop(Show {
id: ShowId::from_raw(0),
title: String::new(),
tagline: String::new(),
overview: String::new(),
first_air_date: NaiveDate::default(),
last_air_date: NaiveDate::default(),
number_of_episodes: 0,
number_of_seasons: 0,
});
}
}