summaryrefslogtreecommitdiff
path: root/src/tileset.rs
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2019-06-26 06:01:12 -0500
committertom barrett <spalf0@gmail.com>2019-06-26 06:01:12 -0500
commitf7bbf5646c8220bca2fbd9451d5c234049cf9225 (patch)
tree735d0d448c060b6bdab0de395b0a0e620fb6a6f2 /src/tileset.rs
parent53b4ccdcc6cdac3b02480a97a2ec30439114ff6c (diff)
clippy and fmt
Diffstat (limited to 'src/tileset.rs')
-rw-r--r--src/tileset.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tileset.rs b/src/tileset.rs
index a5c00af..44941df 100644
--- a/src/tileset.rs
+++ b/src/tileset.rs
@@ -3,7 +3,7 @@ use ggez::graphics::Rect;
use std::collections::HashMap;
use crate::constants;
-use crate::xmlelements::{XMLElements, Property};
+use crate::xmlelements::{Property, XMLElements};
pub struct Tileset {
tiles: HashMap<usize, Rect>,
@@ -45,7 +45,10 @@ impl Tileset {
let mut properties = HashMap::new();
for tile_element in elements.get_elements("tile") {
- let tile_id = XMLElements::get_attribute(&tile_element, "id").unwrap().parse().unwrap();
+ let tile_id = XMLElements::get_attribute(&tile_element, "id")
+ .unwrap()
+ .parse()
+ .unwrap();
let property_elements = elements.get_children(&tile_element, "property");