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

Don't .unwrap() in AssetPath::try_parse #10452

Merged
merged 1 commit into from Nov 9, 2023

Conversation

SludgePhD
Copy link
Contributor

Objective

  • The docs on AssetPath::try_parse say that it will return an error when the string is malformed, but it actually just .unwrap()s the result.

Solution

  • Use ? instead of unwrapping the result.

@MrGVSV MrGVSV added C-Bug An unexpected or incorrect behavior A-Assets Load files from disk to use for things like images, models, and sounds S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Nov 9, 2023
@mockersf mockersf added this pull request to the merge queue Nov 9, 2023
Merged via the queue into bevyengine:main with commit 13d46a5 Nov 9, 2023
25 checks passed
@alice-i-cecile alice-i-cecile added this to the 0.12.1 milestone Nov 9, 2023
@SludgePhD SludgePhD deleted the assetpath-try-parse branch November 9, 2023 18:36
cart pushed a commit that referenced this pull request Nov 30, 2023
# Objective

- The docs on `AssetPath::try_parse` say that it will return an error
when the string is malformed, but it actually just `.unwrap()`s the
result.

## Solution

- Use `?` instead of unwrapping the result.
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
# Objective

- The docs on `AssetPath::try_parse` say that it will return an error
when the string is malformed, but it actually just `.unwrap()`s the
result.

## Solution

- Use `?` instead of unwrapping the result.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior 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.

None yet

6 participants