build: Updated dependencies and upgraded to Rust 1.89.0
This commit is contained in:
Generated
+414
-354
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -10,7 +10,7 @@ homepage = "https://github.com/Dark-Alex-17/managarr"
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
rust-version = "1.85.0"
|
rust-version = "1.89.0"
|
||||||
exclude = [".github", "CONTRIBUTING.md", "*.log", "tags"]
|
exclude = [".github", "CONTRIBUTING.md", "*.log", "tags"]
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
|
|||||||
@@ -72,25 +72,25 @@ pub fn derive_validate_theme(input: TokenStream) -> TokenStream {
|
|||||||
|
|
||||||
let mut validation_checks = Vec::new();
|
let mut validation_checks = Vec::new();
|
||||||
|
|
||||||
if let Data::Struct(data_struct) = &input.data {
|
if let Data::Struct(data_struct) = &input.data
|
||||||
if let Fields::Named(fields) = &data_struct.fields {
|
&& let Fields::Named(fields) = &data_struct.fields
|
||||||
for field in &fields.named {
|
{
|
||||||
let field_name = &field.ident;
|
for field in &fields.named {
|
||||||
|
let field_name = &field.ident;
|
||||||
|
|
||||||
let has_validate_attr = field
|
let has_validate_attr = field
|
||||||
.attrs
|
.attrs
|
||||||
.iter()
|
.iter()
|
||||||
.any(|attr| attr.path().is_ident("validate"));
|
.any(|attr| attr.path().is_ident("validate"));
|
||||||
|
|
||||||
if has_validate_attr {
|
if has_validate_attr {
|
||||||
validation_checks.push(quote! {
|
validation_checks.push(quote! {
|
||||||
if self.#field_name.is_none() {
|
if self.#field_name.is_none() {
|
||||||
log::error!("{} is missing a color value.", stringify!(#field_name));
|
log::error!("{} is missing a color value.", stringify!(#field_name));
|
||||||
eprintln!("{} is missing a color value.", stringify!(#field_name));
|
eprintln!("{} is missing a color value.", stringify!(#field_name));
|
||||||
std::process::exit(1);
|
std::process::exit(1);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,13 +80,8 @@ impl From<&RadarrData<'_>> for EditIndexerModal {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.into();
|
.into();
|
||||||
|
|
||||||
if seed_ratio_value_option.is_some() {
|
if let Some(seed_ratio_value) = seed_ratio_value_option {
|
||||||
edit_indexer_modal.seed_ratio = seed_ratio_value_option
|
edit_indexer_modal.seed_ratio = seed_ratio_value.as_f64().unwrap().to_string().into();
|
||||||
.unwrap()
|
|
||||||
.as_f64()
|
|
||||||
.unwrap()
|
|
||||||
.to_string()
|
|
||||||
.into();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
edit_indexer_modal.tags = tags
|
edit_indexer_modal.tags = tags
|
||||||
|
|||||||
@@ -125,13 +125,8 @@ impl From<&SonarrData<'_>> for EditIndexerModal {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.into();
|
.into();
|
||||||
|
|
||||||
if seed_ratio_value_option.is_some() {
|
if let Some(seed_ratio_value) = seed_ratio_value_option {
|
||||||
edit_indexer_modal.seed_ratio = seed_ratio_value_option
|
edit_indexer_modal.seed_ratio = seed_ratio_value.as_f64().unwrap().to_string().into();
|
||||||
.unwrap()
|
|
||||||
.as_f64()
|
|
||||||
.unwrap()
|
|
||||||
.to_string()
|
|
||||||
.into();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
edit_indexer_modal.tags = tags
|
edit_indexer_modal.tags = tags
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ use std::fmt::Debug;
|
|||||||
#[path = "stateful_table_tests.rs"]
|
#[path = "stateful_table_tests.rs"]
|
||||||
mod stateful_table_tests;
|
mod stateful_table_tests;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, Default)]
|
#[derive(Clone, Debug, Default)]
|
||||||
pub struct SortOption<T>
|
pub struct SortOption<T>
|
||||||
where
|
where
|
||||||
T: Clone + PartialEq + Eq + Debug,
|
T: Clone + PartialEq + Eq + Debug,
|
||||||
@@ -19,6 +19,17 @@ where
|
|||||||
pub cmp_fn: Option<fn(&T, &T) -> Ordering>,
|
pub cmp_fn: Option<fn(&T, &T) -> Ordering>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T> PartialEq for SortOption<T>
|
||||||
|
where
|
||||||
|
T: Clone + PartialEq + Eq + Debug,
|
||||||
|
{
|
||||||
|
fn eq(&self, other: &Self) -> bool {
|
||||||
|
self.name == other.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<T> Eq for SortOption<T> where T: Clone + PartialEq + Eq + Debug {}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct StatefulTable<T>
|
pub struct StatefulTable<T>
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
|
use std::slice;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use bimap::BiMap;
|
use bimap::BiMap;
|
||||||
@@ -3980,7 +3981,7 @@ mod test {
|
|||||||
};
|
};
|
||||||
|
|
||||||
assert_str_eq!(
|
assert_str_eq!(
|
||||||
get_movie_status(false, &[download_record.clone()], 0),
|
get_movie_status(false, slice::from_ref(&download_record), 0),
|
||||||
"Missing"
|
"Missing"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
|
use std::slice;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use bimap::BiMap;
|
use bimap::BiMap;
|
||||||
@@ -5490,7 +5491,7 @@ mod test {
|
|||||||
};
|
};
|
||||||
|
|
||||||
assert_str_eq!(
|
assert_str_eq!(
|
||||||
get_episode_status(false, &[download_record.clone()], 0),
|
get_episode_status(false, slice::from_ref(&download_record), 0),
|
||||||
"Missing"
|
"Missing"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -5502,7 +5503,7 @@ mod test {
|
|||||||
let download_record = DownloadRecord::default();
|
let download_record = DownloadRecord::default();
|
||||||
|
|
||||||
assert_str_eq!(
|
assert_str_eq!(
|
||||||
get_episode_status(false, &[download_record.clone()], 0),
|
get_episode_status(false, slice::from_ref(&download_record), 0),
|
||||||
"Missing"
|
"Missing"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -262,9 +262,9 @@ fn draw_seasons_table(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
|||||||
row.downloaded()
|
row.downloaded()
|
||||||
} else if let Some(next_airing_utc) = next_airing.as_ref() {
|
} else if let Some(next_airing_utc) = next_airing.as_ref() {
|
||||||
if next_airing_utc > &Utc::now() {
|
if next_airing_utc > &Utc::now() {
|
||||||
return row.unreleased();
|
row.unreleased()
|
||||||
} else {
|
} else {
|
||||||
return row.missing();
|
row.missing()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
row.missing()
|
row.missing()
|
||||||
|
|||||||
Reference in New Issue
Block a user