Skip to content

Commit

Permalink
Clippy Changes (amethyst#2657)
Browse files Browse the repository at this point in the history
* [clippy] => amethyst_utils

* [clippy] => amethyst_rendy
  • Loading branch information
Andy-Python-Programmer authored Mar 9, 2021
1 parent f3f2864 commit e19a5bd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
33 changes: 23 additions & 10 deletions amethyst_rendy/src/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,28 +225,41 @@ impl From<khr_lights_punctual::Light<'_>> for Light {
let range = light.range();
match light.kind() {
Kind::Directional => {
let mut directional = DirectionalLight::default();
directional.color = color;
directional.intensity = intensity;
let directional = DirectionalLight {
color,
intensity,

..Default::default()
};

Light::Directional(directional)
}
Kind::Point => {
let mut point = PointLight::default();
point.color = color;
point.intensity = intensity;
let mut point = PointLight {
color,
intensity,

..Default::default()
};

if let Some(r) = range {
point.radius = r;
}

Light::Point(point)
}
Kind::Spot {
inner_cone_angle,
outer_cone_angle,
} => {
let mut spot = SpotLight::default();
spot.angle = outer_cone_angle;
spot.color = color;
spot.intensity = intensity;
let spot = SpotLight {
color,
intensity,
angle: outer_cone_angle,

..Default::default()
};

Light::Spot(spot)
}
}
Expand Down
1 change: 0 additions & 1 deletion amethyst_utils/src/fps_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ impl FpsCounterBundle {
pub fn sample_size(self, samplesize: usize) -> Self {
Self {
samplesize: Some(samplesize),
..self
}
}
}
Expand Down

0 comments on commit e19a5bd

Please sign in to comment.