Skip to content

Commit

Permalink
rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
AnneKitsune committed Dec 23, 2018
1 parent 278e4ad commit 310960b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion amethyst_renderer/src/pass/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ pub fn get_camera<'a>(
camera: &'a ReadStorage<'a, Camera>,
global: &'a ReadStorage<'a, GlobalTransform>,
) -> Option<(&'a Camera, &'a GlobalTransform)> {
active.entity
active
.entity
.and_then(|entity| {
let cam = camera.get(entity);
let transform = global.get(entity);
Expand Down
3 changes: 2 additions & 1 deletion amethyst_renderer/src/sprite_visibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ impl<'a> System<'a> for SpriteVisibilitySortingSystem {

// The camera position is used to determine culling, but the sprites are ordered based on
// the Z coordinate
let camera: Option<&GlobalTransform> = active.entity
let camera: Option<&GlobalTransform> = active
.entity
.and_then(|entity| global.get(entity))
.or_else(|| (&camera, &global).join().map(|cg| cg.1).next());
let camera_backward = camera
Expand Down
3 changes: 2 additions & 1 deletion amethyst_renderer/src/visibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ impl<'a> System<'a> for VisibilitySortingSystem {
) {
let origin = Point3::origin();

let camera: Option<&GlobalTransform> = active.entity
let camera: Option<&GlobalTransform> = active
.entity
.and_then(|entity| global.get(entity))
.or_else(|| (&camera, &global).join().map(|cg| cg.1).next());
let camera_backward = camera
Expand Down

0 comments on commit 310960b

Please sign in to comment.