Format Rust code using rustfmt

This commit is contained in:
github-actions[bot]
2020-04-18 15:58:30 +00:00
committed by GitHub
parent 9a5c4df2b1
commit cba6c16414
18 changed files with 956 additions and 394 deletions

View File

@@ -1,4 +1,4 @@
use crate::{AnimationFrames, Image, from_base36, ToBase36, optional_data_line};
use crate::{from_base36, optional_data_line, AnimationFrames, Image, ToBase36};
#[derive(Debug, Eq, PartialEq)]
pub struct Item {
@@ -50,11 +50,18 @@ impl From<String> for Item {
// todo dedupe
let animation_frames = lines[1..].join("");
let animation_frames: Vec<&str> = animation_frames.split(">").collect();
let animation_frames: Vec<Image> = animation_frames.iter().map(|&frame| {
Image::from(frame.to_string())
}).collect();
let animation_frames: Vec<Image> = animation_frames
.iter()
.map(|&frame| Image::from(frame.to_string()))
.collect();
Item { id, name, animation_frames, dialogue_id, colour_id }
Item {
id,
name,
animation_frames,
dialogue_id,
colour_id,
}
}
}