This commit is contained in:
2023-06-21 12:48:45 +02:00
parent b62e659576
commit c94d0be2ed
3 changed files with 10 additions and 6 deletions

3
Cargo.lock generated
View File

@@ -1822,6 +1822,9 @@ name = "smallvec"
version = "1.10.0" version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "smawk" name = "smawk"

View File

@@ -28,4 +28,4 @@ sentry = "0.31.3"
lazy_static = "1.4.0" lazy_static = "1.4.0"
moka = { version = "0.11.1", features = ["future"] } moka = { version = "0.11.1", features = ["future"] }
axum = "0.6.18" axum = "0.6.18"
smallvec = "1.10.0" smallvec = { version = "1.10.0", features = ["serde"] }

View File

@@ -1,5 +1,6 @@
use core::fmt::Debug; use core::fmt::Debug;
use serde::Deserialize; use serde::Deserialize;
use smallvec::SmallVec;
use super::formaters::{Format, FormatResult, FormatTitle}; use super::formaters::{Format, FormatResult, FormatTitle};
@@ -192,7 +193,7 @@ pub struct Book {
pub title: String, pub title: String,
pub lang: String, pub lang: String,
// file_type: String, // file_type: String,
pub available_types: Vec<String>, pub available_types: SmallVec<[String; 4]>,
// uploaded: String, // uploaded: String,
pub annotation_exists: bool, pub annotation_exists: bool,
pub authors: Vec<BookAuthor>, pub authors: Vec<BookAuthor>,
@@ -211,7 +212,7 @@ pub struct SearchBook {
pub title: String, pub title: String,
pub lang: String, pub lang: String,
// file_type: String, // file_type: String,
pub available_types: Vec<String>, pub available_types: SmallVec<[String; 4]>,
// uploaded: String, // uploaded: String,
pub annotation_exists: bool, pub annotation_exists: bool,
pub authors: Vec<BookAuthor>, pub authors: Vec<BookAuthor>,
@@ -242,7 +243,7 @@ pub struct AuthorBook {
pub title: String, pub title: String,
pub lang: String, pub lang: String,
// file_type: String, // file_type: String,
pub available_types: Vec<String>, pub available_types: SmallVec<[String; 4]>,
// uploaded: String, // uploaded: String,
pub annotation_exists: bool, pub annotation_exists: bool,
pub translators: Vec<BookTranslator>, pub translators: Vec<BookTranslator>,
@@ -272,7 +273,7 @@ pub struct TranslatorBook {
pub title: String, pub title: String,
pub lang: String, pub lang: String,
// file_type: String, // file_type: String,
pub available_types: Vec<String>, pub available_types: SmallVec<[String; 4]>,
// uploaded: String, // uploaded: String,
pub annotation_exists: bool, pub annotation_exists: bool,
pub authors: Vec<BookAuthor>, pub authors: Vec<BookAuthor>,
@@ -303,7 +304,7 @@ pub struct SequenceBook {
pub title: String, pub title: String,
pub lang: String, pub lang: String,
// file_type: String, // file_type: String,
pub available_types: Vec<String>, pub available_types: SmallVec<[String; 4]>,
// uploaded: String, // uploaded: String,
pub authors: Vec<BookAuthor>, pub authors: Vec<BookAuthor>,
pub translators: Vec<BookTranslator>, pub translators: Vec<BookTranslator>,