Sign In

jiff

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jiff - cargo Package Compare versions

Comparing version
0.2.33
to
0.2.34
+2
-2
.cargo_vcs_info.json
{
"git": {
"sha1": "ddd26a89c7f0a6fa8008f35021462e71a8db8b40"
"sha1": "7311a6ac67cf9f3ddada489feb634575b3607d8f"
},
"path_in_vcs": ""
"path_in_vcs": "crates/jiff"
}

@@ -177,5 +177,5 @@ # This file is automatically @generated by Cargo.

name = "fastrand"
version = "2.4.1"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"

@@ -313,3 +313,3 @@ [[package]]

name = "jiff"
version = "0.2.33"
version = "0.2.34"
dependencies = [

@@ -358,5 +358,5 @@ "anyhow",

name = "jiff-static"
version = "0.2.33"
version = "0.2.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96fb828bff41eeb269a9665f950cb359e8018f7288b8f34db24937ff54ed8fc5"
checksum = "323da076b7a6faf914dc677cb05a4b907742ff7375c8322c9e7f5061e5e0e9de"
dependencies = [

@@ -751,3 +751,3 @@ "jiff-core",

"quote",
"syn 3.0.0",
"syn 3.0.1",
]

@@ -839,5 +839,5 @@

name = "syn"
version = "3.0.0"
version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2fac314a64dc9a36e61a9eb4261a5e9bbfbc922b27e518af97bc32b926cf967"
checksum = "5edbec4ed188954a10c12c038215f8ce7606b2d5c973cd8dc43e8795065c5f2f"
dependencies = [

@@ -908,3 +908,3 @@ "proc-macro2",

"quote",
"syn 3.0.0",
"syn 3.0.1",
]

@@ -911,0 +911,0 @@

@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO

name = "jiff"
version = "0.2.33"
version = "0.2.34"
authors = ["Andrew Gallant <jamslam@gmail.com>"]

@@ -230,3 +230,3 @@ build = false

[target."cfg(any())".dependencies.jiff-static]
version = "=0.2.33"
version = "=0.2.34"

@@ -256,8 +256,1 @@ [target.'cfg(any(windows, target_family = "wasm"))'.dependencies.jiff-tzdb-platform]

check-cfg = ["cfg(docsrs_jiff)"]
[profile.test]
opt-level = 1
[profile.testrelease]
debug-assertions = false
inherits = "test"

@@ -47,12 +47,4 @@ use crate::{error, tz::Offset, util::escape};

ExpectedWeekPrefixFoundEndOfInput,
FailedDayInDate,
FailedDayInMonthDay,
FailedFractionalSecondInTime,
FailedHourInTime,
FailedMinuteInTime,
FailedMonthInDate,
FailedMonthInMonthDay,
FailedMonthInYearMonth,
FailedOffsetNumeric,
FailedSecondInTime,
FailedSeparatorAfterMonth,

@@ -62,7 +54,3 @@ FailedSeparatorAfterWeekNumber,

FailedTzdbLookup,
FailedWeekNumberInDate,
FailedWeekNumberPrefixInDate,
FailedWeekdayInDate,
FailedYearInDate,
FailedYearInYearMonth,
InvalidDate,

@@ -225,20 +213,5 @@ InvalidMonthDay,

}
FailedDayInDate => f.write_str("failed to parse day in date"),
FailedDayInMonthDay => {
f.write_str("failed to payse day in month-day")
}
FailedFractionalSecondInTime => {
f.write_str("failed to parse fractional seconds in time")
}
FailedHourInTime => f.write_str("failed to parse hour in time"),
FailedMinuteInTime => {
f.write_str("failed to parse minute in time")
}
FailedMonthInDate => f.write_str("failed to parse month in date"),
FailedMonthInMonthDay => {
f.write_str("failed to parse month in month-day")
}
FailedMonthInYearMonth => {
f.write_str("failed to parse month in year-month")
}
FailedOffsetNumeric => f.write_str(

@@ -248,5 +221,2 @@ "offset successfully parsed, \

),
FailedSecondInTime => {
f.write_str("failed to parse second in time")
}
FailedSeparatorAfterMonth => {

@@ -265,15 +235,5 @@ f.write_str("failed to parse separator after month")

),
FailedWeekNumberInDate => {
f.write_str("failed to parse week number in date")
}
FailedWeekNumberPrefixInDate => {
f.write_str("failed to parse week number prefix in date")
}
FailedWeekdayInDate => {
f.write_str("failed to parse weekday in date")
}
FailedYearInDate => f.write_str("failed to parse year in date"),
FailedYearInYearMonth => {
f.write_str("failed to parse year in year-month")
}
InvalidDate => f.write_str("parsed date is not valid"),

@@ -280,0 +240,0 @@ InvalidMonthDay => f.write_str("parsed month-day is not valid"),

@@ -59,3 +59,4 @@ use core::ffi::{c_char, CStr};

identifier returned invalid UTF-8: {script_cstr}",
script_cstr = escape::Bytes(script_cstr.to_bytes()),
script_cstr =
crate::util::escape::Bytes(script_cstr.to_bytes()),
);

@@ -62,0 +63,0 @@ return None;

@@ -46,4 +46,4 @@ /*!

fn datetime(dt: tzif::DateTime) -> jiff::civil::DateTime {
jiff::civil::DateTime::constant(
fn datetime(dt: tzif::DateTime) -> crate::civil::DateTime {
crate::civil::DateTime::constant(
dt.year(),

@@ -71,3 +71,3 @@ dt.month(),

designation={desig}\t{dst}\tindicator={ind}",
off = jiff::tz::Offset::from_seconds(typ.offset.seconds())
off = jcore::tz::Offset::from_seconds(typ.offset.seconds())
.unwrap(),

@@ -112,4 +112,5 @@ desig = tzif.designations[usize::from(typ.designation)],

type_index = trans.infos[i].type_index,
off = jiff::tz::Offset::from_seconds(typ.offset.seconds())
.unwrap(),
off =
jcore::tz::Offset::from_seconds(typ.offset.seconds())
.unwrap(),
desig = tzif.designations[usize::from(typ.designation)],

@@ -116,0 +117,0 @@ dst = if typ.dst.is_dst() { "dst" } else { "" },

@@ -60,5 +60,3 @@ /*!

pub(crate) const fn error() -> BoundsError {
BoundsError::$name(
RawBoundsWrapperError(RawBoundsError::new()),
)
BoundsError::$name(RawBoundsError::new())
}

@@ -77,5 +75,3 @@

Ok(n) => Ok(n),
Err(err) => {
Err(BoundsError::$name(RawBoundsWrapperError(err)))
}
Err(err) => Err(BoundsError::$name(err)),
}

@@ -150,3 +146,3 @@ }

pub(crate) enum BoundsError {
$($name(RawBoundsWrapperError<$name>),)*
$($name(RawBoundsError<$name>),)*
}

@@ -157,3 +153,3 @@

match *self {
$(BoundsError::$name(ref err) => err.0.fmt(f),)*
$(BoundsError::$name(ref err) => err.fmt(f),)*
}

@@ -309,54 +305,2 @@ }

/// A helper type to implement `defmt::Format`.
///
/// This avoids implementing it in `jiff-core`.
#[derive(Eq, PartialEq)]
pub(crate) struct RawBoundsWrapperError<B>(RawBoundsError<B>);
impl<B> Copy for RawBoundsWrapperError<B> {}
impl<B> Clone for RawBoundsWrapperError<B> {
#[inline]
fn clone(&self) -> RawBoundsWrapperError<B> {
RawBoundsWrapperError(RawBoundsError::new())
}
}
impl<B, P> core::fmt::Debug for RawBoundsWrapperError<B>
where
B: Bounds<Primitive = P>,
P: core::fmt::Debug,
{
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
core::fmt::Debug::fmt(&self.0, f)
}
}
impl<B, P> core::fmt::Display for RawBoundsWrapperError<B>
where
B: Bounds<Primitive = P>,
P: core::fmt::Display,
{
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
core::fmt::Display::fmt(&self.0, f)
}
}
#[cfg(feature = "defmt")]
impl<B, P> defmt::Format for RawBoundsWrapperError<B>
where
B: Bounds<Primitive = P>,
P: defmt::Format,
{
fn format(&self, f: defmt::Formatter) {
defmt::write!(
f,
"RawBoundsError {{ what: {=str}, min: {}, max: {} }}",
B::WHAT,
B::MIN,
B::MAX
);
}
}
/// Like `BoundsError`, but maintained manually.

@@ -363,0 +307,0 @@ ///

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display