Skip to content

Commit 1ad3727

Browse files
committed
Update code to rust 2018 edition
1 parent e435272 commit 1ad3727

File tree

7 files changed

+10
-21
lines changed

7 files changed

+10
-21
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ documentation = "https://docs.rs/random-access-memory"
77
description = "Continuously read,write to memory using random offsets and lengths"
88
authors = ["datrs <[email protected]>"]
99
readme = "README.md"
10+
edition = "2018"
1011

1112
[dependencies]
1213
failure = "0.1.5"

fuzz/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ name = "random-access-memory-fuzz"
44
version = "0.0.1"
55
authors = ["Automatically generated"]
66
publish = false
7+
edition = "2018"
78

89
[package.metadata]
910
cargo-fuzz = true

fuzz/fuzz_targets/fuzz_target_1.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![no_main]
2-
#[macro_use]
3-
extern crate libfuzzer_sys;
4-
extern crate random_access_memory as ram;
2+
3+
use libfuzzer_sys::fuzz_target;
4+
use random_access_memory as ram;
55

66
fuzz_target!(|data: &[u8]| {
77
let mut file = ram::Sync::default();

src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
#![cfg_attr(feature = "nightly", doc(include = "../README.md"))]
44
#![cfg_attr(test, deny(warnings))]
55

6-
#[macro_use]
7-
extern crate failure;
8-
extern crate random_access_storage;
9-
10-
use failure::Error;
6+
use failure::{ensure, Error};
117
use random_access_storage::RandomAccess;
128
use std::cmp;
139
use std::io;

tests/model.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
#[macro_use]
2-
extern crate quickcheck;
3-
extern crate rand;
4-
extern crate random_access_memory as ram;
5-
extern crate random_access_storage;
6-
71
use self::Op::*;
8-
use quickcheck::{Arbitrary, Gen};
2+
use quickcheck::{quickcheck, Arbitrary, Gen};
93
use rand::Rng;
4+
use random_access_memory as ram;
105
use random_access_storage::RandomAccess;
116
use std::u8;
127

tests/regression.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
extern crate random_access_memory as ram;
2-
extern crate random_access_storage;
3-
1+
use random_access_memory as ram;
42
use random_access_storage::RandomAccess;
53

64
#[test]

tests/test.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
extern crate random_access_memory as ram;
2-
extern crate random_access_storage;
3-
1+
use random_access_memory as ram;
42
use random_access_storage::RandomAccess;
53

64
#[test]

0 commit comments

Comments
 (0)