Changed imports style.

This commit is contained in:
2020-07-14 17:58:32 +01:00
parent b33ba8f2d3
commit f5ebcd1cf5
12 changed files with 21 additions and 41 deletions

View File

@@ -1,6 +1,6 @@
//! Interface for converting various structures to and from bytes
// Std
// Imports
use std::{error::Error, fmt::Debug};
/// Conversions to and from bytes for the game file

View File

@@ -1,13 +1,11 @@
#![doc(include = "digimon.md")]
// byteorder
use byteorder::{ByteOrder, LittleEndian};
// Crate
// Imports
use crate::game::{
card::property::{self, ArrowColor, CrossMoveEffect, Effect, EffectCondition, Level, Move, Speciality},
util, Bytes,
};
use byteorder::{ByteOrder, LittleEndian};
/// A digimon card
///

View File

@@ -1,6 +1,6 @@
#![doc(include = "digivolve.md")]
// Crate
// Imports
use crate::game::{util, Bytes};
/// A digivolve card

View File

@@ -1,13 +1,11 @@
#![doc(include = "item.md")]
// byteorder
use byteorder::{ByteOrder, LittleEndian};
// Crate
// Imports
use crate::game::{
card::property::{self, ArrowColor, Effect, EffectCondition},
util, Bytes,
};
use byteorder::{ByteOrder, LittleEndian};
/// An item card
///

View File

@@ -1,13 +1,11 @@
#![doc(include = "effect.md")]
// byteorder
use byteorder::{ByteOrder, LittleEndian};
// Crate
// Imports
use crate::game::{
card::property::{self, AttackType, DigimonProperty, EffectOperation, PlayerType, Slot},
util, Bytes,
};
use byteorder::{ByteOrder, LittleEndian};
/// A digimon's support effects
///

View File

@@ -1,13 +1,11 @@
#![doc(include = "effect_condition.md")]
// byteorder
use byteorder::{ByteOrder, LittleEndian};
// Crate
// Imports
use crate::game::{
card::property::{self, DigimonProperty, EffectConditionOperation},
util, Bytes,
};
use byteorder::{ByteOrder, LittleEndian};
/// A digimon's support effect condition
#[derive(PartialEq, Eq, Clone, Copy, Hash, Debug)]

View File

@@ -4,11 +4,9 @@
#[cfg(test)]
mod test;
// byteorder
use byteorder::{ByteOrder, LittleEndian};
// Crate
// Imports
use crate::game::{util, Bytes};
use byteorder::{ByteOrder, LittleEndian};
/// A digimon's move
#[derive(PartialEq, Eq, Clone, Hash, Debug)]

View File

@@ -1,12 +1,6 @@
#![doc(include = "table.md")]
// Std
use std::io::{Read, Seek, Write};
// byteorder
use byteorder::{ByteOrder, LittleEndian};
// Crate
// Imports
use crate::{
game::{
card::{
@@ -18,6 +12,8 @@ use crate::{
},
io::{address::Data, GameFile},
};
use byteorder::{ByteOrder, LittleEndian};
use std::io::{Read, Seek, Write};
/// The table storing all cards
#[derive(Debug)]

View File

@@ -1,10 +1,8 @@
//! Decks
// byteorder
use byteorder::{ByteOrder, LittleEndian};
// Crate
// Imports
use crate::game::{util, Bytes};
use byteorder::{ByteOrder, LittleEndian};
/// A deck
#[derive(Debug)]

View File

@@ -1,13 +1,11 @@
//! The table of all decks in the game
// Std
use std::io::{Read, Seek, Write};
// Crate
// Imports
use crate::{
game::{deck::deck, Bytes, Deck},
io::{address::Data, GameFile},
};
use std::io::{Read, Seek, Write};
/// The decks table, where all decks are stored
///

View File

@@ -1,6 +1,6 @@
//! File data-only addresses
// Address
// Imports
use crate::io::address::Real;
/// A type for defining addresses on the data parts of `.bin` file.

View File

@@ -2,10 +2,8 @@
//!
//! See [`GameFile`] for details
// Addresses
// Imports
use crate::io::address::{Data as DataAddress, Real as RealAddress, RealToDataError};
// Read / Write
use std::io::{Read, Seek, Write};
/// A type that abstracts over a the game reader.