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

Make path a requirement for parsing tilesets #160

Merged
merged 6 commits into from
Feb 23, 2022

Conversation

aleokdev
Copy link
Contributor

@aleokdev aleokdev commented Feb 12, 2022

This PR heavily simplifies tileset creation by making the root path a requirement, even if it is not used, and also removes the SourceRequired error. While this does force full-embedded tileset users* to use PathBuf::default() as the path instead of None, the internal simplifications make up for that extra allocation.

*Note: Since this crate does not support embedded images yet (The Tiled editor doesn't either), we can safely assume that those users do not exist.

@aleokdev aleokdev changed the title Make path a requirement for parsing Make path a requirement for parsing tilesets Feb 12, 2022
@aleokdev aleokdev added enhancement breaking This change breaks backwards-compatibility labels Feb 12, 2022
Copy link
Member

@bjorn bjorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that looks like a nice simplification. I had two comments.

src/tileset.rs Show resolved Hide resolved
src/tileset.rs Show resolved Hide resolved
bjorn
bjorn previously approved these changes Feb 23, 2022
src/tileset.rs Show resolved Hide resolved
@aleokdev aleokdev merged commit 6cbb5f0 into mapeditor:master Feb 23, 2022
@aleokdev aleokdev deleted the better-tileset branch February 23, 2022 15:57
@aleokdev aleokdev added this to the 0.10.0 milestone Mar 7, 2022
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.

2 participants