Skip to content

Commit 45a4ee7

Browse files
committed
edition: run 'cargo fix --edition --all'
1 parent 3852632 commit 45a4ee7

22 files changed

Lines changed: 68 additions & 73 deletions

‎Cargo.toml‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,10 @@ autotests = false
1313
exclude = [
1414
"/aho-corasick-debug", "/ci/*", "/.travis.yml", "/appveyor.yml",
1515
]
16+
edition = "2018"
1617

1718
[workspace]
18-
members = ["bench"]
19-
# We'd ideally not do this, but since the debug tool uses Rust 2018, older
20-
# versions of Rust (such as 1.28) fail to parse the manifest because it treats
21-
# `edition = "2018"` as an unstable feature.
22-
#
23-
# When we move our MSRV to Rust 2018, then we should be able to add this back
24-
# to the workspace.
25-
exclude = ["aho-corasick-debug"]
19+
members = ["aho-corasick-debug", "bench"]
2620

2721
[lib]
2822
name = "aho_corasick"

‎bench/Cargo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ description = "Criterion benchmark suite for aho-corasick."
77
homepage = "https://github.com/BurntSushi/aho-corasick"
88
repository = "https://github.com/BurntSushi/aho-corasick"
99
license = "Unlicense OR MIT"
10+
edition = "2018"
1011

1112
[lib]
1213
bench = false

‎bench/src/build.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use aho_corasick::{AhoCorasick, AhoCorasickBuilder};
22
use criterion::{black_box, Criterion};
33

4-
use input::{words_15000, words_5000};
5-
use {define, define_long};
4+
use crate::input::{words_15000, words_5000};
5+
use crate::{define, define_long};
66

77
/// Benchmarks that measure the performance of constructing an Aho-Corasick
88
/// automaton.

‎bench/src/random.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use criterion::Criterion;
22

3-
use input::*;
4-
use {define_aho_corasick, define_aho_corasick_dfa};
3+
use crate::input::*;
4+
use crate::{define_aho_corasick, define_aho_corasick_dfa};
55

66
/// These benchmarks test various words on random text.
77
pub fn all(c: &mut Criterion) {

‎bench/src/same.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use criterion::Criterion;
22

3-
use define_aho_corasick;
3+
use crate::define_aho_corasick;
44

55
/// These benchmarks test various workloads on a corpus that corresponds to the
66
/// repetition of a single byte. For the most part, we compare the impact of

‎bench/src/sherlock.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use criterion::Criterion;
22

3-
use define_aho_corasick;
4-
use input::*;
3+
use crate::define_aho_corasick;
4+
use crate::input::*;
55

66
/// These benchmarks test various words on natural language text.
77
///

‎src/ahocorasick.rs‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use std::io;
22

3-
use automaton::Automaton;
4-
use buffer::Buffer;
5-
use dfa::{self, DFA};
6-
use error::Result;
7-
use nfa::{self, NFA};
8-
use packed;
9-
use prefilter::{Prefilter, PrefilterState};
10-
use state_id::StateID;
11-
use Match;
3+
use crate::automaton::Automaton;
4+
use crate::buffer::Buffer;
5+
use crate::dfa::{self, DFA};
6+
use crate::error::Result;
7+
use crate::nfa::{self, NFA};
8+
use crate::packed;
9+
use crate::prefilter::{Prefilter, PrefilterState};
10+
use crate::state_id::StateID;
11+
use crate::Match;
1212

1313
/// An automaton for searching multiple strings in linear time.
1414
///

‎src/automaton.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use ahocorasick::MatchKind;
2-
use prefilter::{self, Candidate, Prefilter, PrefilterState};
3-
use state_id::{dead_id, fail_id, StateID};
4-
use Match;
1+
use crate::ahocorasick::MatchKind;
2+
use crate::prefilter::{self, Candidate, Prefilter, PrefilterState};
3+
use crate::state_id::{dead_id, fail_id, StateID};
4+
use crate::Match;
55

66
// NOTE: This trait essentially started as a copy of the same trait from from
77
// regex-automata, with some wording changed since we use this trait for

‎src/dfa.rs‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
use std::mem::size_of;
22

3-
use ahocorasick::MatchKind;
4-
use automaton::Automaton;
5-
use classes::ByteClasses;
6-
use error::Result;
7-
use nfa::{PatternID, PatternLength, NFA};
8-
use prefilter::{Prefilter, PrefilterObj, PrefilterState};
9-
use state_id::{dead_id, fail_id, premultiply_overflow_error, StateID};
10-
use Match;
3+
use crate::ahocorasick::MatchKind;
4+
use crate::automaton::Automaton;
5+
use crate::classes::ByteClasses;
6+
use crate::error::Result;
7+
use crate::nfa::{PatternID, PatternLength, NFA};
8+
use crate::prefilter::{Prefilter, PrefilterObj, PrefilterState};
9+
use crate::state_id::{dead_id, fail_id, premultiply_overflow_error, StateID};
10+
use crate::Match;
1111

1212
#[derive(Clone, Debug)]
1313
pub enum DFA<S> {

‎src/lib.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,12 @@ extern crate memchr;
194194
// #[cfg(doctest)]
195195
// doctest!("../README.md");
196196

197-
pub use ahocorasick::{
197+
pub use crate::ahocorasick::{
198198
AhoCorasick, AhoCorasickBuilder, FindIter, FindOverlappingIter, MatchKind,
199199
StreamFindIter,
200200
};
201-
pub use error::{Error, ErrorKind};
202-
pub use state_id::StateID;
201+
pub use crate::error::{Error, ErrorKind};
202+
pub use crate::state_id::StateID;
203203

204204
mod ahocorasick;
205205
mod automaton;

0 commit comments

Comments
 (0)