Skip to content

ConvertExact → ConvExact, Convert → ConvTo - #65

Merged
dhardy merged 6 commits into
masterfrom
push-konpquuzvunt
Aug 3, 2026
Merged

ConvertExact → ConvExact, Convert → ConvTo#65
dhardy merged 6 commits into
masterfrom
push-konpquuzvunt

Conversation

@dhardy

@dhardy dhardy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

The major change of this PR is to remove the trait generic::Convert; this was already redundant with ConvTo so all impls are moved there.

Note: the name ConvTo is preferred over Convert for consistency

Also changed:

  • Renamed ConvertExactConvExact (also adjusted method names) and moved to mod traits
  • Reverse order of generic parameters used by CastTo, ConvTo: the R: Rounding parameter now comes first

Further note: doc changes here are minimal; more will land later.

@dhardy

dhardy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

The generic parameters to ConvTo were reversed for consistency with the method calls. Unfortunately this causes an issue with trait impl orphan rules:

error[E0210]: type parameter `R` must be covered by another type when it appears before the first local type (`geom::Coord`)
   --> crates/kas-core/src/geom.rs:263:6
    |
263 | impl<R: Rounding> ConvTo<R, Coord> for kas_text::Vec2 {
    |      ^ uncovered type parameter
    |
    = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local,
            and no uncovered type parameters appear before that first local type
    = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`,
            where `T0` is the first and `Tn` is the last

Edit: this commit was removed from the PR.

@dhardy
dhardy force-pushed the push-konpquuzvunt branch from 8c5d842 to 0ca6499 Compare August 3, 2026 09:26
@dhardy
dhardy merged commit acb8fb0 into master Aug 3, 2026
4 checks passed
@dhardy dhardy changed the title ConvertExact → ConvExact, Convext → ConvTo ConvertExact → ConvExact, Convert → ConvTo Aug 4, 2026
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