upgrade to Rust 2018
parent
8ecca54b13
commit
ee3c2cb8c1
|
@ -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"
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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;
|
||||||
|
|
12
src/main.rs
12
src/main.rs
|
@ -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")}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
@ -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>>;
|
||||||
|
|
Loading…
Reference in New Issue