Skip to content

Commit

Permalink
fix: auto-fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nfejzic committed Sep 9, 2023
1 parent 5c81e6a commit e5204c7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion commons/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ where
format!("HashSet conversion failed with: {:?}", err),
)
});
Ok(HashSet::from_iter(entries?.into_iter()))
Ok(HashSet::from_iter(entries?))
}

// Define extension trait
Expand Down
16 changes: 8 additions & 8 deletions commons/src/config/preamble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub struct I18n {

impl ConfigFns for I18n {
fn merge(&mut self, other: Self) {
self.output_langs.extend(other.output_langs.into_iter());
self.output_langs.extend(other.output_langs);
}

fn validate(&self) -> Result<(), ConfigErr> {
Expand All @@ -79,8 +79,8 @@ pub struct RenderConfig {

impl ConfigFns for RenderConfig {
fn merge(&mut self, other: Self) {
self.ignore.extend(other.ignore.into_iter());
self.parameter.extend(other.parameter.into_iter());
self.ignore.extend(other.ignore);
self.parameter.extend(other.parameter);
}

fn validate(&self) -> Result<(), ConfigErr> {
Expand All @@ -103,7 +103,7 @@ pub struct Citedata {
impl ConfigFns for Citedata {
fn merge(&mut self, other: Self) {
self.style.replace_none(other.style);
self.references.extend(other.references.into_iter());
self.references.extend(other.references);
}

fn validate(&self) -> Result<(), ConfigErr> {
Expand Down Expand Up @@ -146,8 +146,8 @@ pub struct Metadata {
impl ConfigFns for Metadata {
fn merge(&mut self, other: Self) {
self.title.replace_none(other.title);
self.authors.extend(other.authors.into_iter());
self.fonts.extend(other.fonts.into_iter());
self.authors.extend(other.authors);
self.fonts.extend(other.fonts);

// Note: `base` and `description` must not be merged with sub-configs according to specification.
}
Expand Down Expand Up @@ -184,8 +184,8 @@ pub struct HtmlSpecificParameter {

impl ConfigFns for HtmlSpecificParameter {
fn merge(&mut self, other: Self) {
self.favicons.extend(other.favicons.into_iter());
self.keywords.extend(other.keywords.into_iter());
self.favicons.extend(other.favicons);
self.keywords.extend(other.keywords);
}

fn validate(&self) -> Result<(), ConfigErr> {
Expand Down
2 changes: 1 addition & 1 deletion inline/src/inlines/substitute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub(crate) struct Substitutor<'a> {

impl<'sub> Substitutor<'sub> {
pub(crate) fn new() -> Self {
let direct: HashMap<_, _> = EMOJIS.into_iter().chain(ARROWS.into_iter()).collect();
let direct: HashMap<_, _> = EMOJIS.into_iter().chain(ARROWS).collect();
let aliased = ALIASES.into_iter().collect();
let max_len = direct.keys().map(|key| key.len()).max().unwrap_or(0);
let first_grapheme = direct.keys().map(|key| &key[0..1]).collect();
Expand Down

0 comments on commit e5204c7

Please sign in to comment.