Skip to content

Remove generic from UiRect#5526

Closed
alice-i-cecile wants to merge 1 commit intobevyengine:mainfrom
alice-i-cecile:ui-generics-yeet
Closed

Remove generic from UiRect#5526
alice-i-cecile wants to merge 1 commit intobevyengine:mainfrom
alice-i-cecile:ui-generics-yeet

Conversation

@alice-i-cecile
Copy link
Member

@alice-i-cecile alice-i-cecile commented Aug 1, 2022

(This was first noticed by @KDecay; please include them as a coauthor).

Objective

  • This generic was always set to Val in engine and user code.
  • We already have a way to modify the units: the Val::enum.
  • Reduce incidental complexity and boilerplate in bevy_ui's code.

Changelog

  • Removed the generic type T from UiRect. This is now always set to the Val enum.

Migration Guide

  • UiRect no longer supports generic types. Use a Val instead.

@alice-i-cecile alice-i-cecile added A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Aug 1, 2022
@mockersf
Copy link
Member

mockersf commented Aug 1, 2022

it seems @KDecay already has a PR for that: #5404

@alice-i-cecile
Copy link
Member Author

Ah, I forget to check 🤦🏽‍♀️

@alice-i-cecile alice-i-cecile deleted the ui-generics-yeet branch August 1, 2022 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change C-Usability A targeted quality-of-life change that makes Bevy easier to use

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants