Skip to content

Mark constrainCenter return value as discardable #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

mpospese
Copy link
Contributor

@mpospese mpospese commented Nov 22, 2022

Introduction

All our constrain auto layout methods are supposed to return layout constraints as discardable (99% of the time the caller doesn't need to reference them further). constrainCenter breaks this pattern by not being marked discardable (an oversight and a failure in the original PR to add this feature).

Purpose

Mark constrainCenter method return value as discardable

Scope

  • Modify constrainCenter func

Discussion

This was intended to be part of the original ticket but got overlooked. I tried to use the new constrainCenter method in a sample app and the compiler complained that the return type was unused, which alerted me to the mistake.

Resolves #27

📈 Coverage

Nothing should change since we're just adding an attribute to one function.

KMANO05
KMANO05 previously approved these changes Nov 22, 2022
@karthikyml karthikyml dismissed KMANO05’s stale review November 22, 2022 19:19

Invalid account

@mpospese mpospese added the bug Something isn't working label Nov 22, 2022
@mpospese mpospese merged commit ca47b78 into main Nov 22, 2022
@mpospese mpospese deleted the issue/27-constrain-center-return-type branch November 22, 2022 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

constrainCenter return value should be discardable
3 participants