Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Swoorup committed Dec 7, 2024
1 parent 4705f63 commit 1e7b0c8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ keywords = ["Arrow", "arrow"]
repository = "https://github.com/Swoorup/arrow-convert"

[workspace.dependencies]
# workspace crates
arrow_convert = { path = "arrow_convert", version = "0.7.2" }
arrow_convert_derive = { path = "arrow_convert_derive", version = "0.7.2" }

arrow = "53.0"
arrow = "53.3"
chrono = { version = "0.4", default-features = false }
criterion = "0.5"
err-derive = "0.3"
Expand All @@ -30,6 +29,6 @@ quote = "1"
syn = "2"
trybuild = "1.0"
pretty_assertions = "1.4"
tinystr = "0.7"
tinystr = "0.8"
rust_decimal = "1.36"
glam = "0.29"
2 changes: 1 addition & 1 deletion arrow_convert/src/features/tinystr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ impl<const N: usize> ArrowDeserialize for TinyAsciiStr<N> {
type ArrayType = FixedSizeBinaryArray;

fn arrow_deserialize(v: Option<&[u8]>) -> Option<Self> {
v.and_then(|bytes| TinyAsciiStr::from_bytes(bytes).ok())
v.and_then(|bytes| TinyAsciiStr::try_from_utf8(bytes).ok())
}
}
8 changes: 4 additions & 4 deletions arrow_convert/tests/test_tinystr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ fn test_tinyasciistr_roundtrip() {
use tinystr::TinyAsciiStr;

let original: Vec<TinyAsciiStr<3>> = vec![
TinyAsciiStr::from_str("ABC").unwrap(),
TinyAsciiStr::from_str("XYZ").unwrap(),
TinyAsciiStr::from_str("123").unwrap(),
TinyAsciiStr::try_from_str("ABC").unwrap(),
TinyAsciiStr::try_from_str("XYZ").unwrap(),
TinyAsciiStr::try_from_str("123").unwrap(),
];

// Serialize to Arrow
Expand All @@ -35,7 +35,7 @@ fn test_tinyasciistr_max_length() {
use arrow_convert::serialize::TryIntoArrow;
use tinystr::TinyAsciiStr;

let original: Vec<TinyAsciiStr<10>> = vec![TinyAsciiStr::from_str("ABCDEFGHIJ").unwrap()];
let original: Vec<TinyAsciiStr<10>> = vec![TinyAsciiStr::try_from_str("ABCDEFGHIJ").unwrap()];

let arrow_array: ArrayRef = original.try_into_arrow().expect("Failed to convert to Arrow array");
assert!(arrow_array.as_any().is::<FixedSizeBinaryArray>());
Expand Down

0 comments on commit 1e7b0c8

Please sign in to comment.