Skip to content

Commit

Permalink
change hash40 to external dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
benhall-7 committed Nov 1, 2019
1 parent 51cb628 commit 4938f0b
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 189 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ serde_yaml = "0.8"
indexmap = { version = "1.2.0", features = ["serde-1"] }
lazy_static = "1.4.0"
structopt = "0.3.3"
hash40 = "0.1.0"
2 changes: 1 addition & 1 deletion src/motion_lib/asm.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::hash40::*;
use crate::mlist::*;
use byteorder::{LittleEndian, WriteBytesExt};
use hash40::*;
use std::io::{Cursor, Error, ErrorKind};

pub fn assemble(cursor: &mut Cursor<Vec<u8>>, mlist: &MList) -> Result<(), Error> {
Expand Down
2 changes: 1 addition & 1 deletion src/motion_lib/disasm.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::hash40::*;
use crate::mlist::*;
use byteorder::{LittleEndian, ReadBytesExt};
use hash40::*;
use indexmap::IndexMap;
use std::io::{Cursor, Error, ErrorKind};

Expand Down
181 changes: 0 additions & 181 deletions src/motion_lib/hash40.rs

This file was deleted.

4 changes: 0 additions & 4 deletions src/motion_lib/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
mod asm;
mod disasm;
#[allow(clippy::all)]
pub mod hash40;
pub mod mlist;

#[macro_use]
extern crate lazy_static;

use mlist::MList;
use std::fs::{read, File};
use std::io::{prelude::*, Cursor, Error};
Expand Down
2 changes: 1 addition & 1 deletion src/motion_lib/mlist.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::hash40::*;
use hash40::*;
use indexmap::IndexMap;
use serde::{Deserialize, Serialize, Serializer};

Expand Down
3 changes: 2 additions & 1 deletion src/yamlist/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use hash40::load_labels;
use motion_lib;
use serde_yaml::{from_str, to_string};
use std::fs::File;
Expand All @@ -16,7 +17,7 @@ fn main() {
let args = Args::from_args();

if let Some(ref label_path) = args.label {
if let Err(e) = motion_lib::hash40::load_labels(label_path) {
if let Err(e) = load_labels(label_path) {
println!("Error loading labels: {}", e);
return;
}
Expand Down

0 comments on commit 4938f0b

Please sign in to comment.