Skip to content

Bump MSRV; implement Conv for core::{num, ops} types#38

Merged
dhardy merged 7 commits into
masterfrom
push-vktxwtumumzv
Nov 20, 2025
Merged

Bump MSRV; implement Conv for core::{num, ops} types#38
dhardy merged 7 commits into
masterfrom
push-vktxwtumumzv

Conversation

@dhardy

@dhardy dhardy commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

This supports Cast on Saturating, Wrapping and all std::ops::Range* types (excluding RangeFull which has no value).

There is already (limited) support for arrays and tuples.

Besides NonZero* (see #36), this covers all std types which I think should be covered, though there are a few others which could be supported:

  • Option<T>, Result<T, _>: possible, but probably better style to use .map
  • Box<T>, Cow<T>: possible, but seems pretty useless

@dhardy

dhardy commented Nov 20, 2025

Copy link
Copy Markdown
Contributor Author

Saturating was stabilised in Rust 1.74. Since that's now two years old, I'm bumping the MSRV.

@dhardy dhardy changed the title Implement Conv for core::{num, ops} types Bump MSRV; implement Conv for core::{num, ops} types Nov 20, 2025
@dhardy dhardy merged commit 707f0a2 into master Nov 20, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant