Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Update derived impls to fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
swsnr committed Oct 14, 2022
1 parent e77ea6a commit 783bc8f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/render/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use syntect::highlighting::HighlightState;
use syntect::parsing::ParseState;

/// Whether to add a margin.
#[derive(Debug, PartialEq, Copy, Clone)]
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
pub(super) enum MarginControl {
/// Always add a margin.
Margin,
Expand Down Expand Up @@ -51,13 +51,13 @@ where
}
}

#[derive(Debug, PartialEq, Clone, Copy)]
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum ListItemKind {
Unordered,
Ordered(u64),
}

#[derive(Debug, PartialEq, Clone, Copy)]
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum ListItemState {
/// The first line after the list bullet/
StartItem,
Expand All @@ -67,7 +67,7 @@ pub enum ListItemState {
ItemBlock,
}

#[derive(Debug, PartialEq, Clone, Copy)]
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum InlineState {
/// Inline text.
///
Expand Down Expand Up @@ -161,7 +161,7 @@ where
}

/// Attributes for highlighted blocks, that is, code blocks.
#[derive(Debug, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct HighlightBlockAttrs {
pub(super) ansi: AnsiStyle,
pub(super) parse_state: ParseState,
Expand Down Expand Up @@ -219,7 +219,7 @@ impl From<LiteralBlockAttrs> for StackedState {
}

/// State attributes for top level.
#[derive(Debug, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct TopLevelAttrs {
pub(super) margin_before: MarginControl,
}
Expand Down
2 changes: 1 addition & 1 deletion src/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub enum StyleCapability {
}

/// How the terminal supports inline links.
#[derive(Debug, PartialEq, Copy, Clone)]
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
pub enum LinkCapability {
/// The terminal supports [OSC 8] inline links.
///
Expand Down
2 changes: 1 addition & 1 deletion src/terminal/ansi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use ansi_term::Style;
use std::io::{Result, Write};

/// Access to a terminal’s basic ANSI styling functionality.
#[derive(PartialEq, Debug, Clone, Copy)]
#[derive(PartialEq, Eq, Debug, Clone, Copy)]
pub struct AnsiStyle;

impl AnsiStyle {
Expand Down
2 changes: 1 addition & 1 deletion src/terminal/osc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub fn write_osc<W: Write>(writer: &mut W, command: &str) -> Result<()> {
Ok(())
}

#[derive(Debug, PartialEq, Copy, Clone)]
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
pub struct Osc8Links;

/// Whether the given `url` needs to get an explicit host.
Expand Down

0 comments on commit 783bc8f

Please sign in to comment.