Fix clippy::derive_partial_eq_without_eq
This commit is contained in:
parent
405dda6722
commit
faf00d1047
@ -26,7 +26,7 @@ pub fn find_content_components<P: AsRef<Path>>(path: P) -> Vec<String> {
|
||||
}
|
||||
|
||||
/// Struct that contains all the information about the actual file
|
||||
#[derive(Debug, Default, Clone, PartialEq)]
|
||||
#[derive(Debug, Default, Clone, PartialEq, Eq)]
|
||||
pub struct FileInfo {
|
||||
/// The full path to the .md file
|
||||
pub path: PathBuf,
|
||||
|
||||
@ -12,7 +12,7 @@ use utils::de::{fix_toml_dates, from_toml_datetime};
|
||||
use crate::front_matter::split::RawFrontMatter;
|
||||
|
||||
/// The front matter of every page
|
||||
#[derive(Debug, Clone, PartialEq, Deserialize)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct PageFrontMatter {
|
||||
/// <title> of the page
|
||||
|
||||
@ -11,7 +11,7 @@ use crate::SortBy;
|
||||
static DEFAULT_PAGINATE_PATH: &str = "page";
|
||||
|
||||
/// The front matter of every section
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct SectionFrontMatter {
|
||||
/// <title> of the page
|
||||
|
||||
@ -33,7 +33,7 @@ static RFC3339_DATE: Lazy<Regex> = Lazy::new(|| {
|
||||
|
||||
static FOOTNOTES_RE: Lazy<Regex> = Lazy::new(|| Regex::new(r#"<sup class="footnote-reference"><a href=\s*.*?>\s*.*?</a></sup>"#).unwrap());
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq)]
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq)]
|
||||
pub struct Page {
|
||||
/// All info about the actual file
|
||||
pub file: FileInfo,
|
||||
|
||||
@ -13,14 +13,14 @@ use crate::ser::{SectionSerMode, SerializingPage, SerializingSection};
|
||||
use crate::taxonomies::{Taxonomy, TaxonomyTerm};
|
||||
use crate::Section;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
enum PaginationRoot<'a> {
|
||||
Section(&'a Section),
|
||||
Taxonomy(&'a Taxonomy, &'a TaxonomyTerm),
|
||||
}
|
||||
|
||||
/// A list of all the pages in the paginator with their index and links
|
||||
#[derive(Clone, Debug, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
|
||||
pub struct Pager<'a> {
|
||||
/// The page number in the paginator (1-indexed)
|
||||
pub index: usize,
|
||||
@ -43,7 +43,7 @@ impl<'a> Pager<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct Paginator<'a> {
|
||||
/// All pages in the section/taxonomy
|
||||
all_pages: Cow<'a, [PathBuf]>,
|
||||
|
||||
@ -17,7 +17,7 @@ use crate::ser::{SectionSerMode, SerializingSection};
|
||||
use crate::utils::{find_related_assets, get_reading_analytics, has_anchor};
|
||||
|
||||
// Default is used to create a default index section if there is no _index.md in the root content directory
|
||||
#[derive(Clone, Debug, Default, PartialEq)]
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq)]
|
||||
pub struct Section {
|
||||
/// All info about the actual file
|
||||
pub file: FileInfo,
|
||||
|
||||
@ -8,13 +8,13 @@ use crate::{Page, Section};
|
||||
use libs::tera::{Map, Value};
|
||||
use utils::table_of_contents::Heading;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
|
||||
pub struct BackLink<'a> {
|
||||
pub permalink: &'a str,
|
||||
pub title: &'a Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
|
||||
pub struct TranslatedContent<'a> {
|
||||
pub lang: &'a str,
|
||||
pub permalink: &'a str,
|
||||
@ -39,7 +39,7 @@ fn find_backlinks<'a>(relative_path: &str, library: &'a Library) -> Vec<BackLink
|
||||
backlinks
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
|
||||
pub struct SerializingPage<'a> {
|
||||
relative_path: &'a str,
|
||||
content: &'a str,
|
||||
@ -134,7 +134,7 @@ impl<'a> SerializingPage<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
|
||||
pub struct SerializingSection<'a> {
|
||||
relative_path: &'a str,
|
||||
content: &'a str,
|
||||
|
||||
@ -16,7 +16,7 @@ use crate::{Page, SortBy};
|
||||
|
||||
use crate::sorting::sort_pages;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
|
||||
pub struct SerializedTaxonomyTerm<'a> {
|
||||
name: &'a str,
|
||||
slug: &'a str,
|
||||
@ -104,7 +104,9 @@ impl PartialEq for TaxonomyTerm {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize)]
|
||||
impl Eq for TaxonomyTerm {}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
|
||||
pub struct SerializedTaxonomy<'a> {
|
||||
kind: &'a TaxonomyConfig,
|
||||
lang: &'a str,
|
||||
@ -128,7 +130,7 @@ impl<'a> SerializedTaxonomy<'a> {
|
||||
}
|
||||
}
|
||||
/// All different taxonomies we have and their content
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Taxonomy {
|
||||
pub kind: TaxonomyConfig,
|
||||
pub lang: String,
|
||||
@ -256,7 +258,7 @@ impl Taxonomy {
|
||||
}
|
||||
|
||||
/// Only used while building the taxonomies
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub(crate) struct TaxonomyFound<'a> {
|
||||
pub lang: &'a str,
|
||||
pub slug: String,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize, Eq)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum SortBy {
|
||||
/// Most recent to oldest
|
||||
|
||||
@ -10,7 +10,7 @@ use utils::templates::ShortcodeFileType;
|
||||
|
||||
pub const SHORTCODE_PLACEHOLDER: &str = "@@ZOLA_SC_PLACEHOLDER@@";
|
||||
|
||||
#[derive(PartialEq, Debug)]
|
||||
#[derive(PartialEq, Debug, Eq)]
|
||||
pub struct Shortcode {
|
||||
pub(crate) name: String,
|
||||
pub(crate) args: Value,
|
||||
|
||||
@ -10,7 +10,7 @@ use content::{Page, TaxonomyTerm};
|
||||
use errors::Result;
|
||||
use utils::templates::render_template;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
|
||||
pub struct SerializedFeedTaxonomyItem<'a> {
|
||||
name: &'a str,
|
||||
slug: &'a str,
|
||||
|
||||
@ -4,7 +4,7 @@ use std::collections::HashMap;
|
||||
use errors::{anyhow, Result};
|
||||
|
||||
/// Result of a successful resolution of an internal link.
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub struct ResolvedInternalLink {
|
||||
/// Resolved link target, as absolute URL address.
|
||||
pub permalink: String,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
use serde::Serialize;
|
||||
|
||||
/// Populated while receiving events from the markdown parser
|
||||
#[derive(Debug, Default, PartialEq, Clone, Serialize)]
|
||||
#[derive(Debug, Default, PartialEq, Eq, Clone, Serialize)]
|
||||
pub struct Heading {
|
||||
pub level: u32,
|
||||
pub id: String,
|
||||
|
||||
@ -15,7 +15,7 @@ macro_rules! render_default_tpl {
|
||||
}};
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum ShortcodeFileType {
|
||||
Markdown,
|
||||
Html,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum InsertAnchor {
|
||||
Left,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user