Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
hohav committed Nov 16, 2023
1 parent 3633378 commit 39c3c9a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
6 changes: 1 addition & 5 deletions src/model/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ use serde::Serialize;
use serde_json;

use crate::{
model::{
frame::transpose,
shift_jis::MeleeString,
slippi,
},
model::{frame::transpose, shift_jis::MeleeString, slippi},
serde::de,
};

Expand Down
5 changes: 1 addition & 4 deletions src/model/game/mutable.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
use serde_json;

use crate::model::{
frame::mutable::Frame,
game,
};
use crate::model::{frame::mutable::Frame, game};

pub struct Game {
pub start: game::Start,
Expand Down
8 changes: 5 additions & 3 deletions src/serde/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ impl game::Game for ParseState {
}

fn frame(&self, idx: usize) -> transpose::Frame {
self.game.frames.transpose_one(idx, self.game.start.slippi.version)
self.game
.frames
.transpose_one(idx, self.game.start.slippi.version)
}
}

Expand Down Expand Up @@ -844,8 +846,8 @@ pub fn deserialize<R: Read>(mut r: &mut R, opts: Option<&Opts>) -> Result<Game>
0x55 => {
parse_metadata(r.by_ref(), &mut state)?;
expect_bytes(&mut r, &[0x7d])?;
},
0x7d => {}, // top-level closing brace ("}")
}
0x7d => {} // top-level closing brace ("}")
x => return Err(err!("expected: 0x55 or 0x7d, got: 0x{:x}", x)),
};

Expand Down
6 changes: 3 additions & 3 deletions tests/peppi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ use xxhash_rust::xxh3::xxh3_64;
use peppi::{
model::{
frame::transpose,
game::immutable::Game,
game::{
Bytes, DashBack, End, EndMethod, Language, Netplay, Player, PlayerType, Port,
Scene, ShieldDrop, Start, Ucf,
Bytes, DashBack, End, EndMethod, Language, Netplay, Player, PlayerType, Port, Scene,
ShieldDrop, Start, Ucf,
},
game::immutable::Game,
shift_jis::MeleeString,
slippi::{Slippi, Version},
},
Expand Down

0 comments on commit 39c3c9a

Please sign in to comment.