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

Do not require mut on ParsedPath::element_mut #8891

Merged
merged 1 commit into from Jun 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/bevy_reflect/src/path.rs
Expand Up @@ -371,7 +371,7 @@ impl ParsedPath {
///
/// See [`element_mut`](Self::element_mut) for a typed version of this method.
pub fn reflect_element_mut<'r, 'p>(
&'p mut self,
&'p self,
root: &'r mut dyn Reflect,
) -> Result<&'r mut dyn Reflect, ReflectPathError<'p>> {
let mut current = root;
Expand Down Expand Up @@ -402,7 +402,7 @@ impl ParsedPath {
///
/// See [`reflect_element_mut`](Self::reflect_element_mut) for an untyped version of this method.
pub fn element_mut<'r, 'p, T: Reflect>(
&'p mut self,
&'p self,
root: &'r mut dyn Reflect,
) -> Result<&'r mut T, ReflectPathError<'p>> {
self.reflect_element_mut(root).and_then(|p| {
Expand Down