Skip to content

Commit

Permalink
Update to Rust's 2018 edition
Browse files Browse the repository at this point in the history
Travis still has Rust 1.35.0 installed, and the code is now relying on
non-lexical lifetimes, which only shipped in the 2015 edition
as part of Rust 1.36.0, so just migrate to the newer edition to
ensure that NLL is available.
  • Loading branch information
Ortham committed Jul 20, 2019
1 parent 5c51b46 commit 8062d73
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 18 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Expand Up @@ -8,6 +8,7 @@ repository = "https://github.com/Ortham/esplugin.git"
readme = "README.md"
categories = ["games", "parsing"]
license = "GPL-3.0"
edition = "2018"

[badges]
travis-ci = { repository = "Ortham/esplugin" }
Expand Down
8 changes: 4 additions & 4 deletions src/group.rs
Expand Up @@ -25,10 +25,10 @@ use nom::number::complete::le_u32;
use nom::sequence::delimited;
use nom::IResult;

use error::Error;
use game_id::GameId;
use record::Record;
use record_id::RecordId;
use crate::error::Error;
use crate::game_id::GameId;
use crate::record::Record;
use crate::record_id::RecordId;

const GROUP_TYPE: &[u8] = b"GRUP";

Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Expand Up @@ -25,9 +25,9 @@ extern crate flate2;

use std::convert::TryInto;

pub use error::Error;
pub use game_id::GameId;
pub use plugin::Plugin;
pub use crate::error::Error;
pub use crate::game_id::GameId;
pub use crate::plugin::Plugin;

mod error;
mod form_id;
Expand Down
12 changes: 6 additions & 6 deletions src/plugin.rs
Expand Up @@ -26,12 +26,12 @@ use encoding_rs::WINDOWS_1252;

use nom::{self, IResult};

use error::Error;
use form_id::HashedFormId;
use game_id::GameId;
use group::Group;
use record::Record;
use record_id::{NamespacedId, RecordId};
use crate::error::Error;
use crate::form_id::HashedFormId;
use crate::game_id::GameId;
use crate::group::Group;
use crate::record::Record;
use crate::record_id::{NamespacedId, RecordId};

#[derive(Copy, Clone, PartialEq, Eq)]
enum FileExtension {
Expand Down
8 changes: 4 additions & 4 deletions src/record.rs
Expand Up @@ -26,10 +26,10 @@ use nom::number::complete::le_u32;
use nom::sequence::{delimited, pair, terminated, tuple};
use nom::IResult;

use error::Error;
use game_id::GameId;
use record_id::{NamespacedId, RecordId};
use subrecord::{parse_subrecord_data_as_u32, Subrecord, SubrecordRef, SubrecordType};
use crate::error::Error;
use crate::game_id::GameId;
use crate::record_id::{NamespacedId, RecordId};
use crate::subrecord::{parse_subrecord_data_as_u32, Subrecord, SubrecordRef, SubrecordType};

const RECORD_TYPE_LENGTH: usize = 4;
pub type RecordType = [u8; 4];
Expand Down
2 changes: 1 addition & 1 deletion src/subrecord.rs
Expand Up @@ -35,7 +35,7 @@ use nom::number::complete::{le_u16, le_u32};
use nom::sequence::{pair, preceded, separated_pair, tuple};
use nom::IResult;

use game_id::GameId;
use crate::game_id::GameId;

const SUBRECORD_TYPE_LENGTH: usize = 4;
pub type SubrecordType = [u8; 4];
Expand Down

0 comments on commit 8062d73

Please sign in to comment.