Skip to content

Commit

Permalink
Use built-in truncation of recent Jiff version
Browse files Browse the repository at this point in the history
  • Loading branch information
sgoll committed Aug 9, 2024
1 parent f2b336b commit 9acbe24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion juniper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fnv = "1.0.5"
futures = { version = "0.3.22", features = ["alloc"], default-features = false }
graphql-parser = { version = "0.4", optional = true }
indexmap = { version = "2.0", features = ["serde"] }
jiff = { version = "0.1.4", optional = true }
jiff = { version = "0.1.5", optional = true }
juniper_codegen = { version = "0.16.0", path = "../juniper_codegen" }
rust_decimal = { version = "1.20", default-features = false, optional = true }
ryu = { version = "1.0", optional = true }
Expand Down
5 changes: 1 addition & 4 deletions juniper/src/integrations/jiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,7 @@ mod local_time {
if v.subsec_nanosecond() == 0 {
v.strftime(FORMAT_NO_MILLIS)
} else {
// `LocalTime` scalar only allows precision up to milliseconds.
(*v).round(jiff::Unit::Millisecond)
.unwrap_or_else(|e| panic!("failed to format `LocalTime`: {e}"))
.strftime(FORMAT)
v.strftime(FORMAT)
}
.to_string(),
)
Expand Down

0 comments on commit 9acbe24

Please sign in to comment.