Skip to content

Commit

Permalink
Guard serde
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Jan 14, 2025
1 parent a304f3d commit ada8074
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion crates/settings/src/indent_width.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ use std::num::NonZeroU8;
/// Validated value for the `indent-width` formatter options
///
/// The allowed range of values is 1..=24
#[derive(Clone, Copy, Eq, Hash, PartialEq, serde::Serialize)]
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
pub struct IndentWidth(NonZeroU8);

impl IndentWidth {
Expand Down
3 changes: 2 additions & 1 deletion crates/settings/src/line_width.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ use std::num::NonZeroU16;
/// Validated value for the `line-width` formatter options
///
/// The allowed range of values is 1..=320
#[derive(Clone, Copy, Eq, PartialEq, serde::Serialize)]
#[derive(Clone, Copy, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
pub struct LineWidth(NonZeroU16);

impl LineWidth {
Expand Down

0 comments on commit ada8074

Please sign in to comment.