Format Rust code using rustfmt
This commit is contained in:
committed by
GitHub
parent
9a5c4df2b1
commit
cba6c16414
17
src/item.rs
17
src/item.rs
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user