Rename GameType variants to use fewer acronyms

A minor quality of life improvement since the nom 5 update is a
breaking change.
This commit is contained in:
Oliver Hamlet
2019-06-30 11:25:23 +01:00
parent 4db34be2c9
commit 6cfefc6c31
5 changed files with 122 additions and 120 deletions
+9 -9
View File
@@ -23,7 +23,7 @@ fn generate_plugin_versions() -> Vec<(String, String)> {
fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("Expression.eval() file(path)", |b| {
let state = State::new(GameType::Tes4, ".".into(), ".".into());
let state = State::new(GameType::Oblivion, ".".into(), ".".into());
let expression = Expression::from_str("file(\"Cargo.toml\")").unwrap();
b.iter(|| {
@@ -32,7 +32,7 @@ fn criterion_benchmark(c: &mut Criterion) {
});
c.bench_function("Expression.eval() file(regex)", |b| {
let state = State::new(GameType::Tes4, ".".into(), ".".into());
let state = State::new(GameType::Oblivion, ".".into(), ".".into());
let expression = Expression::from_str("file(\"Cargo.*\")").unwrap();
b.iter(|| {
@@ -42,7 +42,7 @@ fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("Expression.eval() active(path)", |b| {
let state = State::new(
GameType::Tes4,
GameType::Oblivion,
"tests/testing-plugins/Oblivion/Data".into(),
".".into(),
)
@@ -57,7 +57,7 @@ fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("Expression.eval() active(regex)", |b| {
let state = State::new(
GameType::Tes4,
GameType::Oblivion,
"tests/testing-plugins/Oblivion/Data".into(),
".".into(),
)
@@ -71,7 +71,7 @@ fn criterion_benchmark(c: &mut Criterion) {
});
c.bench_function("Expression.eval() many()", |b| {
let state = State::new(GameType::Tes4, ".".into(), ".".into());
let state = State::new(GameType::Oblivion, ".".into(), ".".into());
let expression = Expression::from_str("many(\"Cargo.*\")").unwrap();
b.iter(|| {
@@ -81,7 +81,7 @@ fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("Expression.eval() many_active()", |b| {
let state = State::new(
GameType::Tes4,
GameType::Oblivion,
"tests/testing-plugins/Oblivion/Data".into(),
".".into(),
)
@@ -96,7 +96,7 @@ fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("Expression.eval() checksum()", |b| {
let state = State::new(
GameType::Tes4,
GameType::Oblivion,
"tests/testing-plugins/Oblivion/Data".into(),
".".into(),
);
@@ -109,7 +109,7 @@ fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("Expression.eval() version(plugin)", |b| {
let state = State::new(
GameType::Tes4,
GameType::Oblivion,
"tests/testing-plugins/Oblivion/Data".into(),
".".into(),
)
@@ -123,7 +123,7 @@ fn criterion_benchmark(c: &mut Criterion) {
});
c.bench_function("Expression.eval() version(executable)", |b| {
let state = State::new(GameType::Tes4, ".".into(), ".".into());
let state = State::new(GameType::Oblivion, ".".into(), ".".into());
let expression = Expression::from_str(
"version(\"tests/loot_api_win32/loot_api.dll\", \"0.13.8.0\", ==)",
)