upgrade to Rust 2018

png-branch
an 2018-12-08 17:54:42 -05:00
parent 8ecca54b13
commit ee3c2cb8c1
6 changed files with 15 additions and 14 deletions

View File

@ -2,6 +2,7 @@
name = "maraiah" name = "maraiah"
version = "0.1.0" version = "0.1.0"
authors = ["marrub"] authors = ["marrub"]
edition = "2018"
[dependencies] [dependencies]
memmap = "0.6" memmap = "0.6"

View File

@ -1,6 +1,6 @@
//! Macintosh archived format header utilities. //! Macintosh archived format header utilities.
use durandal::bin::*; use crate::durandal::bin::*;
/// Checks for an AppleSingle header. Returns offset to the resource fork. /// Checks for an AppleSingle header. Returns offset to the resource fork.
pub fn check_apple_single(b: &[u8]) -> Option<usize> pub fn check_apple_single(b: &[u8]) -> Option<usize>

View File

@ -2,8 +2,8 @@
use generic_array::*; use generic_array::*;
use durandal::image::*; use crate::durandal::image::*;
use durandal::bin::*; use crate::durandal::bin::*;
const PACK_DEFAULT: u16 = 0; const PACK_DEFAULT: u16 = 0;
const PACK_NONE : u16 = 1; const PACK_NONE : u16 = 1;

View File

@ -7,14 +7,14 @@ pub mod marathon;
use std::{io, fs, env}; use std::{io, fs, env};
use std::io::Write; use std::io::Write;
use durandal::pict::load_pict; use crate::durandal::pict::load_pict;
use durandal::image::Image; use crate::durandal::image::Image;
use marathon::{wad, term}; use crate::marathon::{wad, term};
use memmap::Mmap; use memmap::Mmap;
use durandal::bin::ResultS; use crate::durandal::bin::ResultS;
#[derive(Debug)] #[derive(Debug)]
struct Minf struct Minf
@ -33,8 +33,8 @@ impl Minf
{ {
fn chunk(b: &[u8]) -> ResultS<Minf> fn chunk(b: &[u8]) -> ResultS<Minf>
{ {
use durandal::text::mac_roman_conv; use crate::durandal::text::mac_roman_conv;
use durandal::bin::*; use crate::durandal::bin::*;
if b.len() < 88 {return Err("not enough data for Minf")} if b.len() < 88 {return Err("not enough data for Minf")}

View File

@ -1,7 +1,7 @@
use std::fmt; use std::fmt;
use durandal::text::*; use crate::durandal::text::*;
use durandal::bin::*; use crate::durandal::bin::*;
impl Terminal impl Terminal
{ {

View File

@ -3,9 +3,9 @@
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::fmt; use std::fmt;
use durandal::bin::*; use crate::durandal::bin::*;
use durandal::machead::try_mac_header; use crate::durandal::machead::try_mac_header;
use durandal::text::mac_roman_conv; use crate::durandal::text::mac_roman_conv;
type Chunk <'a> = &'a[u8]; type Chunk <'a> = &'a[u8];
type ChunkMap<'a> = BTreeMap<Ident, Chunk<'a>>; type ChunkMap<'a> = BTreeMap<Ident, Chunk<'a>>;