You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2023/06/11 21:08:17 UTC

[arrow-rs] branch master updated: Minor: Derive `Hash` impls for `CastOptions` and `FormatOptions` (#4395)

This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/master by this push:
     new 83adf96af Minor: Derive `Hash` impls for `CastOptions` and `FormatOptions` (#4395)
83adf96af is described below

commit 83adf96af2fd21ea5d659da4c90f53de3e4dea2f
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Sun Jun 11 17:08:11 2023 -0400

    Minor: Derive `Hash` impls for `CastOptions` and `FormatOptions` (#4395)
---
 arrow-cast/src/cast.rs    | 2 +-
 arrow-cast/src/display.rs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arrow-cast/src/cast.rs b/arrow-cast/src/cast.rs
index ec8559d96..32f422768 100644
--- a/arrow-cast/src/cast.rs
+++ b/arrow-cast/src/cast.rs
@@ -57,7 +57,7 @@ use num::cast::AsPrimitive;
 use num::{NumCast, ToPrimitive};
 
 /// CastOptions provides a way to override the default cast behaviors
-#[derive(Debug, Clone, PartialEq, Eq)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct CastOptions<'a> {
     /// how to handle cast failures, either return NULL (safe=true) or return ERR (safe=false)
     pub safe: bool,
diff --git a/arrow-cast/src/display.rs b/arrow-cast/src/display.rs
index 1c2ecfc5e..07e78f898 100644
--- a/arrow-cast/src/display.rs
+++ b/arrow-cast/src/display.rs
@@ -39,7 +39,7 @@ type TimeFormat<'a> = Option<&'a str>;
 /// By default nulls are formatted as `""` and temporal types formatted
 /// according to RFC3339
 ///
-#[derive(Debug, Clone, PartialEq, Eq)]
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct FormatOptions<'a> {
     /// If set to `true` any formatting errors will be written to the output
     /// instead of being converted into a [`std::fmt::Error`]