fix compile errs

This commit is contained in:
2025-08-14 23:51:15 +02:00
parent 8daa4f0863
commit 2f2c0c6bf5
5 changed files with 5 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
use crate::{
response_deserializer,
response_deserializer::{Chapter, ChapterFeed, Id, Manga},
types::{Chapter, ChapterFeed, Id, Manga},
util::{ConfigSelectionType, CoverSize, Selection, SelectionRange, SelectionType},
BASE,
};

View File

@@ -1,7 +1,7 @@
#![allow(unused)]
use serde::Serialize;
use crate::response_deserializer::{
use crate::types::{
Chapter, ContentRating, Manga, PublicationDemographic, State, Status, Titles,
};
use crate::language::Language;

View File

@@ -1,4 +1,3 @@
// TODO: Remove this
use crate::error::*;
use crate::types::*;
use crate::language::Language;
@@ -146,7 +145,7 @@ pub fn deserialize_chapter_images(json: &str) -> ChapterImages {
serde_json::from_str(json).unwrap()
}
fn opt_string_to_opt_f32<'de, D>(deserializer: D) -> Result<Option<f32>, D::Error>
pub fn opt_string_to_opt_f32<'de, D>(deserializer: D) -> Result<Option<f32>, D::Error>
where
D: Deserializer<'de>,
{

View File

@@ -1,5 +1,6 @@
#![allow(unused)]
use crate::language::Language;
use crate::response_deserializer::opt_string_to_opt_f32;
use chrono::{DateTime, FixedOffset};
use serde::{Deserialize, Serialize};
@@ -126,7 +127,6 @@ pub struct ChapterAttributes {
pub version: u32,
}
#[allow(unused)]
#[derive(Deserialize, Debug)]
#[serde(deny_unknown_fields)]
pub struct SearchResult {
@@ -138,7 +138,6 @@ pub struct SearchResult {
pub total: u32,
}
#[allow(unused)]
#[derive(Deserialize, Debug)]
#[serde(deny_unknown_fields)]
pub struct IdQueryResult {
@@ -147,7 +146,6 @@ pub struct IdQueryResult {
pub data: Manga,
}
#[allow(unused)]
#[derive(Deserialize, Debug)]
#[serde(deny_unknown_fields)]
pub struct Manga {
@@ -158,7 +156,6 @@ pub struct Manga {
pub relationships: Vec<Relationship>,
}
#[allow(unused)]
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
#[serde(deny_unknown_fields)]
@@ -188,7 +185,6 @@ pub struct MangaAttributes {
pub latest_uploaded_chapter: Option<Id>,
}
#[allow(unused)]
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
#[serde(deny_unknown_fields)]
@@ -203,7 +199,6 @@ pub struct CoverAttributes {
pub version: u32,
}
#[allow(unused)]
#[derive(Deserialize, Debug)]
#[serde(deny_unknown_fields)]
pub struct Tag {
@@ -214,7 +209,6 @@ pub struct Tag {
pub relationships: Vec<Relationship>,
}
#[allow(unused)]
#[derive(Deserialize, Debug)]
#[serde(deny_unknown_fields)]
pub struct Relationship {
@@ -225,7 +219,6 @@ pub struct Relationship {
pub attributes: Option<CoverAttributes>,
}
#[allow(unused)]
#[derive(Deserialize, Debug)]
#[serde(deny_unknown_fields)]
pub struct TagAttributes {
@@ -235,14 +228,12 @@ pub struct TagAttributes {
pub version: u32,
}
#[allow(unused)]
#[derive(Deserialize, Debug)]
#[serde(deny_unknown_fields)]
pub struct TagName {
pub en: String,
}
#[allow(unused)]
#[derive(Deserialize, Debug, Default)]
#[serde(deny_unknown_fields)]
pub struct Links {
@@ -260,7 +251,6 @@ pub struct Links {
nu: Option<String>,
}
#[allow(unused)]
#[derive(Deserialize, Debug)]
// #[serde(deny_unknown_fields)]
// TODO: Fill
@@ -269,7 +259,6 @@ pub struct Description {
pub ru: Option<String>,
}
#[allow(unused)]
#[derive(Deserialize, Debug)]
// #[serde(deny_unknown_fields)]
// TODO: Fill

View File

@@ -1,6 +1,6 @@
use crate::{
response_deserializer,
response_deserializer::ChapterImages,
types::ChapterImages,
Chapter, Id, BASE,
};
use icy_sixel::{DiffusionMethod, MethodForLargest, MethodForRep, PixelFormat, Quality};