Skip to content

Commit e4a6148

Browse files
committed
Fix the mixed_lighting example to use get_cloned_mut.
1 parent 862eb3a commit e4a6148

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/3d/mixed_lighting.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ fn update_lightmaps(
257257
}
258258

259259
// Lightmap exposure defaults to zero, so we need to set it.
260-
if let Some(ref mut material) = materials.get_mut(material) {
260+
if let Some(ref mut material) = materials.get_cloned_mut(material) {
261261
material.lightmap_exposure = LIGHTMAP_EXPOSURE;
262262
}
263263

@@ -280,7 +280,7 @@ fn update_lightmaps(
280280
// Add lightmaps to or remove lightmaps from the sphere.
281281
if &**name == "Sphere" {
282282
// Lightmap exposure defaults to zero, so we need to set it.
283-
if let Some(ref mut material) = materials.get_mut(material) {
283+
if let Some(ref mut material) = materials.get_cloned_mut(material) {
284284
material.lightmap_exposure = LIGHTMAP_EXPOSURE;
285285
}
286286

0 commit comments

Comments
 (0)