Skip to content

Remove Val's try_* arithmetic methods#9609

Merged
alice-i-cecile merged 2 commits intobevyengine:mainfrom
ickshonpe:remove-val-try-arithmetic-methods
Aug 28, 2023
Merged

Remove Val's try_* arithmetic methods#9609
alice-i-cecile merged 2 commits intobevyengine:mainfrom
ickshonpe:remove-val-try-arithmetic-methods

Conversation

@ickshonpe
Copy link
Copy Markdown
Contributor

@ickshonpe ickshonpe commented Aug 28, 2023

Objective

Remove Val's try_* arithmetic methods.

fixes #9571

Changelog

Removed these methods from bevy_ui::ui_node::Val:

  • try_add
  • try_sub
  • try_add_assign_with_size
  • try_sub_assign_with_size
  • try_add_assign
  • try_sub_assign
  • try_add_assign_with_size
  • try_sub_assign_with_size

Migration Guide

Val's try_* arithmetic methods have been removed. To perform arithmetic on Vals deconstruct them using pattern matching.

@alice-i-cecile alice-i-cecile added M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Aug 28, 2023
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Aug 28, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Aug 28, 2023
Merged via the queue into bevyengine:main with commit 9f27f01 Aug 28, 2023
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
# Objective

Remove `Val`'s `try_*` arithmetic methods.

fixes bevyengine#9571

## Changelog

Removed these methods from `bevy_ui::ui_node::Val`:
- `try_add`
- `try_sub`
- `try_add_assign_with_size`
- `try_sub_assign_with_size` 
- `try_add_assign`
- `try_sub_assign`
- `try_add_assign_with_size`
- `try_sub_assign_with_size`


## Migration Guide

`Val`'s `try_*` arithmetic methods have been removed. To perform
arithmetic on `Val`s deconstruct them using pattern matching.
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-Usability A targeted quality-of-life change that makes Bevy easier to use M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the Val::try_* arithmetic functions

3 participants