-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 by Bors] - Add From<String> for AssetPath<'a> #6337
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's sad that the solution is just copying pasting from &str
with the only difference being that this returns owned values. I'm not blocking on this, but perhaps implementing ToOwned
would be viable here?
Approving this =)
Yea. I agree with you. But since we are passing in an owned String, any variable created would not live long enough to return. Do you have some reference as to how |
Essentially both Maybe |
I tried implementing using And got the following error which I think is the same as
|
Hmm. What if we go through the |
That is possible but we will lose the label of |
bors r+ |
# Objective Fixes #6291 ## Solution Implement `From<String>` for `AssetPath<'a>`
Pull request successfully merged into main. Build succeeded:
|
# Objective Fixes bevyengine#6291 ## Solution Implement `From<String>` for `AssetPath<'a>`
# Objective Fixes bevyengine#6291 ## Solution Implement `From<String>` for `AssetPath<'a>`
# Objective Fixes bevyengine#6291 ## Solution Implement `From<String>` for `AssetPath<'a>`
Objective
Fixes #6291
Solution
Implement
From<String>
forAssetPath<'a>