Skip to content

Commit

Permalink
Stupid workaround for rust-lang/rust#30905
Browse files Browse the repository at this point in the history
  • Loading branch information
crumblingstatue committed Jul 6, 2016
1 parent 4e1a82d commit 9fbcc91
Show file tree
Hide file tree
Showing 15 changed files with 225 additions and 218 deletions.
2 changes: 2 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
reorder-imports = true
write-mode = "overwrite"
7 changes: 4 additions & 3 deletions src/gamedata_io/audio.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::io;
use byteorder::{ReadBytesExt, WriteBytesExt, LittleEndian};
use {GameDataRead, GameDataWrite, Audio, AudioData};
use gamedata_io::{Chunk, get_chunk_header, ReadError, read_into_byte_vec, Tell};
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use {GameDataRead, GameDataWrite};
use unexposed::{Audio, AudioData};
use gamedata_io::{Chunk, ReadError, Tell, get_chunk_header, read_into_byte_vec};

impl<'a> Chunk<'a> for Audio {
const TYPE_ID: &'static [u8; 4] = b"AUDO";
Expand Down
7 changes: 4 additions & 3 deletions src/gamedata_io/code.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::io;
use byteorder::{ReadBytesExt, WriteBytesExt, LittleEndian};
use {GameDataRead, GameDataWrite, Code, CodeChunk};
use gamedata_io::{Chunk, get_chunk_header, ReadError, read_into_byte_vec, Tell};
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use {GameDataRead, GameDataWrite};
use unexposed::{Code, CodeChunk};
use gamedata_io::{Chunk, ReadError, Tell, get_chunk_header, read_into_byte_vec};

pub fn write_offsets<W: GameDataWrite>(code: &Code,
writer: &mut W,
Expand Down
6 changes: 3 additions & 3 deletions src/gamedata_io/fonts.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::io;
use byteorder::{ReadBytesExt, WriteBytesExt, LittleEndian};
use {GameDataRead, GameDataWrite, Font, Fonts};
use gamedata_io::{Chunk, get_chunk_header, ReadError, read_into_byte_vec, Tell};
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use {Font, Fonts, GameDataRead, GameDataWrite};
use gamedata_io::{Chunk, ReadError, Tell, get_chunk_header, read_into_byte_vec};

pub struct Offset {
pub name: u32,
Expand Down
7 changes: 4 additions & 3 deletions src/gamedata_io/functions.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::io;
use byteorder::{ReadBytesExt, WriteBytesExt, LittleEndian};
use {GameDataRead, GameDataWrite, Function, Functions};
use gamedata_io::{Chunk, get_chunk_header, ReadError};
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use {GameDataRead, GameDataWrite};
use gamedata_io::{Chunk, ReadError, get_chunk_header};
use unexposed::{Function, Functions};

pub fn write_offsets<W: GameDataWrite>(funs: &Functions,
writer: &mut W,
Expand Down
7 changes: 4 additions & 3 deletions src/gamedata_io/meta_data.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::io;
use byteorder::{ReadBytesExt, WriteBytesExt, LittleEndian};
use {GameDataRead, GameDataWrite, MetaData};
use gamedata_io::{Chunk, get_chunk_header, ReadError, Tell};
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use {GameDataRead, GameDataWrite};
use gamedata_io::{Chunk, ReadError, Tell, get_chunk_header};
use unexposed::MetaData;

#[derive(Clone, Copy)]
pub struct Offsets {
Expand Down
8 changes: 4 additions & 4 deletions src/gamedata_io/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//! Implementation of Reading/Writing the Game Maker Studio data format.

use std::io::{self, Seek};
use byteorder::{self, ReadBytesExt, WriteBytesExt, LittleEndian};
use super::{GameData, MetaData, Options, Extn, Sounds, AudioGroups, Sprites, Backgrounds, Paths,
Scripts, Shaders, Fonts, Timelines, Objects, Rooms, Dafl, Tpag, Code, Variables,
Functions, Strings, Textures, Audio, GameDataRead, GameDataWrite};
use byteorder::{self, LittleEndian, ReadBytesExt, WriteBytesExt};
use super::{Fonts, GameData, GameDataRead, GameDataWrite, Sounds, Sprites, Strings, Textures};

use unexposed::*;

mod meta_data;
mod options;
Expand Down
7 changes: 4 additions & 3 deletions src/gamedata_io/options.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::io;
use byteorder::{ReadBytesExt, WriteBytesExt, LittleEndian};
use {GameDataRead, GameDataWrite, Options};
use gamedata_io::{Chunk, get_chunk_header, ReadError};
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use {GameDataRead, GameDataWrite};
use gamedata_io::{Chunk, ReadError, get_chunk_header};
use unexposed::Options;

#[derive(Clone, Copy)]
pub struct Offsets {
Expand Down
7 changes: 4 additions & 3 deletions src/gamedata_io/scripts.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::io;
use byteorder::{ReadBytesExt, WriteBytesExt, LittleEndian};
use {GameDataRead, GameDataWrite, Script, Scripts};
use gamedata_io::{Chunk, get_chunk_header, ReadError, Tell};
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use {GameDataRead, GameDataWrite};
use gamedata_io::{Chunk, ReadError, Tell, get_chunk_header};
use unexposed::{Script, Scripts};

pub fn write_offsets<W: GameDataWrite>(scripts: &Scripts,
writer: &mut W,
Expand Down
6 changes: 3 additions & 3 deletions src/gamedata_io/sounds.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::io;
use byteorder::{ReadBytesExt, WriteBytesExt, LittleEndian};
use {GameDataRead, GameDataWrite, Sounds, Sound};
use gamedata_io::{Chunk, get_chunk_header, ReadError, Tell};
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use {GameDataRead, GameDataWrite, Sound, Sounds};
use gamedata_io::{Chunk, ReadError, Tell, get_chunk_header};

pub struct Offsets {
pub name_offset: u32,
Expand Down
4 changes: 2 additions & 2 deletions src/gamedata_io/sprites.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::io;
use byteorder::{ReadBytesExt, WriteBytesExt, LittleEndian};
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use {GameDataRead, GameDataWrite, Sprite, Sprites};
use gamedata_io::{Chunk, get_chunk_header, ReadError, read_into_byte_vec, Tell};
use gamedata_io::{Chunk, ReadError, Tell, get_chunk_header, read_into_byte_vec};

pub fn write_offsets<W: GameDataWrite>(sprites: &Sprites,
writer: &mut W,
Expand Down
4 changes: 2 additions & 2 deletions src/gamedata_io/strings.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::io;
use byteorder::{self, ReadBytesExt, WriteBytesExt, LittleEndian};
use byteorder::{self, LittleEndian, ReadBytesExt, WriteBytesExt};
use {GameDataRead, GameDataWrite, Strings};
use gamedata_io::{Chunk, get_chunk_header, ReadError, Tell};
use gamedata_io::{Chunk, ReadError, Tell, get_chunk_header};

impl<'a> Chunk<'a> for Strings {
const TYPE_ID: &'static [u8; 4] = b"STRG";
Expand Down
4 changes: 2 additions & 2 deletions src/gamedata_io/textures.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::io;
use byteorder::{ReadBytesExt, WriteBytesExt, LittleEndian, BigEndian};
use byteorder::{BigEndian, LittleEndian, ReadBytesExt, WriteBytesExt};
use {GameDataRead, GameDataWrite, Texture, Textures};
use gamedata_io::{Chunk, get_chunk_header, ReadError, read_into_byte_vec, Tell};
use gamedata_io::{Chunk, ReadError, Tell, get_chunk_header, read_into_byte_vec};

const IMAGE_DATA_ALIGNMENT: u32 = 128;

Expand Down
7 changes: 4 additions & 3 deletions src/gamedata_io/variables.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::io;
use byteorder::{ReadBytesExt, WriteBytesExt, LittleEndian};
use {GameDataRead, GameDataWrite, Variable, Variables};
use gamedata_io::{Chunk, get_chunk_header, ReadError};
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use {GameDataRead, GameDataWrite};
use gamedata_io::{Chunk, ReadError, get_chunk_header};
use unexposed::{Variable, Variables};

pub fn write_offsets<W: GameDataWrite>(variables: &Variables,
writer: &mut W,
Expand Down
Loading

0 comments on commit 9fbcc91

Please sign in to comment.