Skip to content

Commit

Permalink
style: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kbknapp committed Jul 8, 2024
1 parent e863349 commit 959b873
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@ use strum::{Display, EnumString};
pub use self::{json_writer::JsonWriter, md_writer::MarkdownWriter};
use crate::{clog::Clog, error::Result, sectionmap::SectionMap};

#[derive(Copy, Clone, PartialEq, Eq, Debug, EnumString, Display)]
#[derive(Copy, Clone, PartialEq, Eq, Debug, Default, EnumString, Display)]
#[strum(ascii_case_insensitive)]
pub enum ChangelogFormat {
Json,
#[default]
Markdown,
}

impl Default for ChangelogFormat {
fn default() -> Self { ChangelogFormat::Markdown }
}

impl<'de> serde::de::Deserialize<'de> for ChangelogFormat {
fn deserialize<D>(deserializer: D) -> StdResult<Self, D::Error>
where
Expand Down
7 changes: 2 additions & 5 deletions src/link_style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,16 @@ use strum::{Display, EnumString};
/// let clog = Clog::new().unwrap();
/// clog.link_style(LinkStyle::Stash);
/// ```
#[derive(Debug, Copy, Clone, PartialEq, Eq, Display, EnumString)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Default, Display, EnumString)]
#[strum(ascii_case_insensitive)]
pub enum LinkStyle {
#[default]
Github,
Gitlab,
Stash,
Cgit,
}

impl Default for LinkStyle {
fn default() -> Self { LinkStyle::Github }
}

impl<'de> serde::de::Deserialize<'de> for LinkStyle {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
Expand Down

0 comments on commit 959b873

Please sign in to comment.