From ee3c2cb8c1f5376ff314cd445328fa86f8ad9fc6 Mon Sep 17 00:00:00 2001 From: Marrub Date: Sat, 8 Dec 2018 17:54:42 -0500 Subject: [PATCH] upgrade to Rust 2018 --- Cargo.toml | 1 + src/durandal/machead.rs | 2 +- src/durandal/pict.rs | 4 ++-- src/main.rs | 12 ++++++------ src/marathon/term.rs | 4 ++-- src/marathon/wad.rs | 6 +++--- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8713dbc..65d8835 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "maraiah" version = "0.1.0" authors = ["marrub"] +edition = "2018" [dependencies] memmap = "0.6" diff --git a/src/durandal/machead.rs b/src/durandal/machead.rs index fb3f039..9a0b0e0 100644 --- a/src/durandal/machead.rs +++ b/src/durandal/machead.rs @@ -1,6 +1,6 @@ //! Macintosh archived format header utilities. -use durandal::bin::*; +use crate::durandal::bin::*; /// Checks for an AppleSingle header. Returns offset to the resource fork. pub fn check_apple_single(b: &[u8]) -> Option diff --git a/src/durandal/pict.rs b/src/durandal/pict.rs index 3afb7dc..3e0efe3 100644 --- a/src/durandal/pict.rs +++ b/src/durandal/pict.rs @@ -2,8 +2,8 @@ use generic_array::*; -use durandal::image::*; -use durandal::bin::*; +use crate::durandal::image::*; +use crate::durandal::bin::*; const PACK_DEFAULT: u16 = 0; const PACK_NONE : u16 = 1; diff --git a/src/main.rs b/src/main.rs index 09c12d1..7194bee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,14 +7,14 @@ pub mod marathon; use std::{io, fs, env}; use std::io::Write; -use durandal::pict::load_pict; -use durandal::image::Image; +use crate::durandal::pict::load_pict; +use crate::durandal::image::Image; -use marathon::{wad, term}; +use crate::marathon::{wad, term}; use memmap::Mmap; -use durandal::bin::ResultS; +use crate::durandal::bin::ResultS; #[derive(Debug)] struct Minf @@ -33,8 +33,8 @@ impl Minf { fn chunk(b: &[u8]) -> ResultS { - use durandal::text::mac_roman_conv; - use durandal::bin::*; + use crate::durandal::text::mac_roman_conv; + use crate::durandal::bin::*; if b.len() < 88 {return Err("not enough data for Minf")} diff --git a/src/marathon/term.rs b/src/marathon/term.rs index a4d5d66..5583e4e 100644 --- a/src/marathon/term.rs +++ b/src/marathon/term.rs @@ -1,7 +1,7 @@ use std::fmt; -use durandal::text::*; -use durandal::bin::*; +use crate::durandal::text::*; +use crate::durandal::bin::*; impl Terminal { diff --git a/src/marathon/wad.rs b/src/marathon/wad.rs index f8a73f9..f0b9902 100644 --- a/src/marathon/wad.rs +++ b/src/marathon/wad.rs @@ -3,9 +3,9 @@ use std::collections::BTreeMap; use std::fmt; -use durandal::bin::*; -use durandal::machead::try_mac_header; -use durandal::text::mac_roman_conv; +use crate::durandal::bin::*; +use crate::durandal::machead::try_mac_header; +use crate::durandal::text::mac_roman_conv; type Chunk <'a> = &'a[u8]; type ChunkMap<'a> = BTreeMap>;