-
-
Notifications
You must be signed in to change notification settings - Fork 54
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: BurntSushi/jiff
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: jiff-static-0.2.3
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: BurntSushi/jiff
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.2.4
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 4 commits
- 26 files changed
- 1 contributor
Commits on Mar 7, 2025
-
tz: fix comment and remove superfluous
repr(align(..))
When I originally wrote the comment on `Repr`, I got the alignment wrong. But I caught that mistake and fixed it before merging anything to `master`. I just hadn't updated the comment. The `repr(align(..))` was leftovers from experimenting with a `TzifDateTime` that *wasn't* packed. I was trying to get `rustc` to optimize comparisons automatically to a single integer, but couldn't get ti to work. So I resorted to bit-packing. Since the representation is now just an `i64`, an explicit alignment is not needed. (And it didn't help anyway.)
Configuration menu - View commit details
-
Copy full SHA for 460a0bc - Browse repository at this point
Copy the full SHA 460a0bcView commit details
Commits on Mar 10, 2025
-
This was still the copy from `jiff-tzdb`. Update it to be about `jiff-static`.
Configuration menu - View commit details
-
Copy full SHA for 0a0b5a0 - Browse repository at this point
Copy the full SHA 0a0b5a0View commit details -
rangeint: remove PartialEq and PartialOrd impls for i{8,16,32,64,128}
Unfortunately, these impls can cause inference regressions when non-robust code is written that assumes there is only one Partial{Eq,Ord} impl for a particular integer type. It would be one thing if these trait impls were external or somehow fundamental to Jiff's design. But they only existed as a convenience. So we remove the trait impls and take our medicine. We already had a `Constant` wrapper type (also used for trait impls), so we just switch all equality and inequality comparisons over to that. I tested this with the following program: ```rust use env_logger; fn main() { let x: u64 = 1; let y: i128 = 0; assert!(y < x.into()); let x: u32 = 1; let y: i64 = 0; assert!(y < x.into()); let x: u16 = 1; let y: i32 = 0; assert!(y < x.into()); let x: u8 = 1; let y: i16 = 0; assert!(y < x.into()); } ``` And this `Cargo.toml`: ```toml [package] publish = false name = "jiff-inference-regression" version = "0.1.0" edition = "2024" [patch.crates-io] jiff = { path = "/home/andrew/rust/jiff/fixit" } [dependencies] env_logger = { version = "0.11.7", features = ["humantime"] } [[bin]] name = "jiff-inference-regression" path = "main.rs" [profile.release] debug = true ``` I took this path because it's either this or the reporter fixes their code. Arguably, the reporter should fix their code since it's likely their code will break when or if some other crate adds similar trait impls. But as I said, these trait impls are just for convenience, so the pragmatic trade-off is to remove them and thus not be the source of whatever problems folks hit. [I asked the lang team about this problem][lang-zulip-question], and they seem to agree that this is the right course of action. (And there are ideas swirling around on how to mitigate this problem, but that's for the future.) Fixes #293 [lang-zulip-question]: https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/about.20the.20breakage.20that.20results.20from.20relying.20on.20inference/with/504689811
Configuration menu - View commit details
-
Copy full SHA for b9119a3 - Browse repository at this point
Copy the full SHA b9119a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4404fb0 - Browse repository at this point
Copy the full SHA 4404fb0View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff jiff-static-0.2.3...0.2.4