Skip to content

Commit

Permalink
Add Copy and Hash derives to FixedDecimlFormtterOptions (#4506)
Browse files Browse the repository at this point in the history
Similar to #4503 - This enables hashing of fixed decimal options which
is needed by memoizers.
  • Loading branch information
zbraniecki authored Jan 4, 2024
1 parent 729ce9f commit fb4ef4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/decimal/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// A bag of options defining how numbers will be formatted by
/// [`FixedDecimalFormatter`](crate::FixedDecimalFormatter).
#[derive(Debug, Eq, PartialEq, Clone, Default)]
#[derive(Debug, Eq, PartialEq, Clone, Copy, Default, Hash)]
#[non_exhaustive]
pub struct FixedDecimalFormatterOptions {
/// When to render grouping separators.
Expand Down Expand Up @@ -43,7 +43,7 @@ impl From<GroupingStrategy> for FixedDecimalFormatterOptions {
/// assert_writeable_eq!(fdf.format(&ten_thousand), "10,000");
/// ```
#[non_exhaustive]
#[derive(Debug, Eq, PartialEq, Clone, Copy)]
#[derive(Debug, Eq, PartialEq, Clone, Copy, Hash)]
pub enum GroupingStrategy {
/// Render grouping separators according to locale preferences.
Auto,
Expand Down

0 comments on commit fb4ef4b

Please sign in to comment.