Skip to content

Commit

Permalink
chore: get rid of copying Context
Browse files Browse the repository at this point in the history
  • Loading branch information
ekropotin committed Jun 27, 2024
1 parent 457bc00 commit c06997a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{
};

use crate::rules::ALL_RULES;
#[derive(Deserialize, Debug, PartialEq, Clone)]
#[derive(Deserialize, Debug, PartialEq)]
pub enum RuleSeverity {
#[serde(rename = "err")]
Error,
Expand All @@ -16,7 +16,7 @@ pub enum RuleSeverity {
Off,
}

#[derive(Deserialize, Debug, PartialEq, Clone)]
#[derive(Deserialize, Debug, PartialEq)]
pub enum HeadingStyle {
#[serde(rename = "consistent")]
Consistent,
Expand All @@ -26,7 +26,7 @@ pub enum HeadingStyle {
Setext,
}

#[derive(Deserialize, Debug, PartialEq, Clone)]
#[derive(Deserialize, Debug, PartialEq)]
pub struct MD003HeadingStyleTable {
pub style: HeadingStyle,
}
Expand All @@ -39,19 +39,19 @@ impl Default for MD003HeadingStyleTable {
}
}

#[derive(Deserialize, Debug, Default, PartialEq, Clone)]
#[derive(Deserialize, Debug, Default, PartialEq)]
pub struct LintersSettingsTable {
#[serde(rename = "heading-style")]
pub heading_style: MD003HeadingStyleTable,
}

#[derive(Deserialize, Debug, Default, PartialEq, Clone)]
#[derive(Deserialize, Debug, Default, PartialEq)]
pub struct LintersTable {
pub severity: HashMap<String, RuleSeverity>,
pub settings: LintersSettingsTable,
}

#[derive(Deserialize, Debug, Default, PartialEq, Clone)]
#[derive(Deserialize, Debug, Default, PartialEq)]
pub struct QuickmarkConfig {
pub linters: LintersTable,
}
Expand Down
2 changes: 1 addition & 1 deletion src/linter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl Display for RuleViolation {
}
}

#[derive(Debug, Clone)]
#[derive(Debug)]
pub struct Context {
pub file_path: PathBuf,
pub config: QuickmarkConfig,
Expand Down

0 comments on commit c06997a

Please sign in to comment.