Skip to content
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

Remove Layer suffix from LayerType variants #203

Merged
merged 3 commits into from
Apr 12, 2022

Conversation

aleokdev
Copy link
Contributor

Done to improve readability:

// Previously
match &layer.layer_type() {
    LayerType::TileLayer(l) => do_thing(),
    LayerType::ObjectLayer(l) => do_thing_2(),
    _ => ()
}
// Now
match &layer.layer_type() {
    LayerType::Tile(l) => do_thing(),
    LayerType::Object(l) => do_thing_2(),
    _ => ()
}

@aleokdev aleokdev added enhancement breaking This change breaks backwards-compatibility labels Mar 26, 2022
@aleokdev aleokdev added this to the 0.11.0 milestone Mar 26, 2022
@bjorn
Copy link
Member

bjorn commented Mar 28, 2022

Since we're renaming anyway, would it make sense to use Tiles and Objects, since these layers contain multiples, whereas an Image layer does not, and Group already indicates multiple?

@aleokdev aleokdev requested a review from bjorn April 3, 2022 17:23
@aleokdev aleokdev merged commit b2c19a0 into mapeditor:0.11 Apr 12, 2022
@aleokdev aleokdev deleted the remove-layer-suffixes branch April 12, 2022 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This change breaks backwards-compatibility enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants