Fix clippy

This commit is contained in:
ManyTheFish 2022-10-24 13:57:26 +02:00
parent 4afed4de4f
commit 68c9751d49
4 changed files with 10 additions and 10 deletions

View File

@ -70,7 +70,7 @@ impl From<TaskEvent> for NewTaskEvent {
} }
} }
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
#[allow(clippy::large_enum_variant)] #[allow(clippy::large_enum_variant)]
pub enum TaskContent { pub enum TaskContent {
DocumentAddition { DocumentAddition {

View File

@ -109,7 +109,7 @@ pub struct SearchResult {
pub facet_distribution: Option<BTreeMap<String, BTreeMap<String, u64>>>, pub facet_distribution: Option<BTreeMap<String, BTreeMap<String, u64>>>,
} }
#[derive(Serialize, Debug, Clone, PartialEq)] #[derive(Serialize, Debug, Clone, PartialEq, Eq)]
#[serde(untagged)] #[serde(untagged)]
pub enum HitsInfo { pub enum HitsInfo {
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
@ -296,7 +296,7 @@ impl Index {
.unwrap_or(0); .unwrap_or(0);
HitsInfo::Pagination { HitsInfo::Pagination {
hits_per_page: hits_per_page, hits_per_page,
page: query.page.unwrap_or(1), page: query.page.unwrap_or(1),
total_pages, total_pages,
total_hits: number_of_hits, total_hits: number_of_hits,

View File

@ -38,7 +38,7 @@ pub struct Checked;
pub struct Unchecked; pub struct Unchecked;
#[cfg_attr(test, derive(proptest_derive::Arbitrary))] #[cfg_attr(test, derive(proptest_derive::Arbitrary))]
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)] #[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct MinWordSizeTyposSetting { pub struct MinWordSizeTyposSetting {
@ -51,7 +51,7 @@ pub struct MinWordSizeTyposSetting {
} }
#[cfg_attr(test, derive(proptest_derive::Arbitrary))] #[cfg_attr(test, derive(proptest_derive::Arbitrary))]
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)] #[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct TypoSettings { pub struct TypoSettings {
@ -70,7 +70,7 @@ pub struct TypoSettings {
} }
#[cfg_attr(test, derive(proptest_derive::Arbitrary))] #[cfg_attr(test, derive(proptest_derive::Arbitrary))]
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)] #[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct FacetingSettings { pub struct FacetingSettings {
@ -80,7 +80,7 @@ pub struct FacetingSettings {
} }
#[cfg_attr(test, derive(proptest_derive::Arbitrary))] #[cfg_attr(test, derive(proptest_derive::Arbitrary))]
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)] #[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct PaginationSettings { pub struct PaginationSettings {
@ -92,7 +92,7 @@ pub struct PaginationSettings {
/// Holds all the settings for an index. `T` can either be `Checked` if they represents settings /// Holds all the settings for an index. `T` can either be `Checked` if they represents settings
/// whose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a /// whose validity is guaranteed, or `Unchecked` if they need to be validated. In the later case, a
/// call to `check` will return a `Settings<Checked>` from a `Settings<Unchecked>`. /// call to `check` will return a `Settings<Checked>` from a `Settings<Unchecked>`.
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)] #[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
#[serde(bound(serialize = "T: Serialize", deserialize = "T: Deserialize<'static>"))] #[serde(bound(serialize = "T: Serialize", deserialize = "T: Deserialize<'static>"))]

View File

@ -80,7 +80,7 @@ impl TaskEvent {
/// It's stored on disk and executed from the lowest to highest Task id. /// It's stored on disk and executed from the lowest to highest Task id.
/// Every time a new task is created it has a higher Task id than the previous one. /// Every time a new task is created it has a higher Task id than the previous one.
/// See also `Job`. /// See also `Job`.
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
#[cfg_attr(test, derive(proptest_derive::Arbitrary))] #[cfg_attr(test, derive(proptest_derive::Arbitrary))]
pub struct Task { pub struct Task {
pub id: TaskId, pub id: TaskId,
@ -135,7 +135,7 @@ pub enum DocumentDeletion {
Ids(Vec<String>), Ids(Vec<String>),
} }
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
#[cfg_attr(test, derive(proptest_derive::Arbitrary))] #[cfg_attr(test, derive(proptest_derive::Arbitrary))]
#[allow(clippy::large_enum_variant)] #[allow(clippy::large_enum_variant)]
pub enum TaskContent { pub enum TaskContent {