Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: upgrade to jiff 0.2 #1838

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 30 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gix-archive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ gix-date = { version = "^0.9.3", path = "../gix-date" }

flate2 = { version = "1.0.33", optional = true }
zip = { version = "2.1.0", optional = true, default-features = false, features = ["deflate"] }
jiff = { version = "0.1.2", default-features = false, features = ["std"] }
jiff = { version = "0.2.0", default-features = false, features = ["std"] }

thiserror = "2.0.0"
bstr = { version = "1.5.0", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion gix-date/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ serde = ["dep:serde", "bstr/serde"]
bstr = { version = "1.3.0", default-features = false, features = ["std"] }
serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] }
itoa = "1.0.1"
jiff = "0.1.1"
jiff = "0.2.0"
thiserror = "2.0.0"

document-features = { version = "0.2.0", optional = true }
Expand Down
3 changes: 2 additions & 1 deletion gix-date/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ mod relative {

#[test]
fn two_weeks_ago() {
assert_eq!(parse_inner("2 weeks ago").unwrap().unwrap(), Span::new().weeks(2));
let actual = parse_inner("2 weeks ago").unwrap().unwrap();
assert_eq!(actual.fieldwise(), Span::new().weeks(2));
}
Comment on lines 169 to 172
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only breaking chages in test. Now Span doesn't implement PartialEq/Eq, but for assertion, we can use fieldwise.

}
}
Loading