Update esplugin to 6.0.0

This commit is contained in:
Oliver Hamlet
2024-06-28 17:25:47 +01:00
parent 37bf6c7b29
commit 54f9541c34
3 changed files with 6 additions and 4 deletions
Generated
+3 -2
View File
@@ -223,12 +223,13 @@ dependencies = [
[[package]]
name = "esplugin"
version = "5.0.1"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aaba49860ce44e95b9073c5508cb0511f304a2f4c05195ed1f43b5ae875d88e7"
checksum = "a06a6ad4fdedeafc4f24c0ead8fc260add681c0fd268e72807fb84238081a4b9"
dependencies = [
"encoding_rs",
"nom",
"unicase",
]
[[package]]
+1 -1
View File
@@ -7,7 +7,7 @@ edition = "2021"
[dependencies]
crc32fast = "1.4.2"
esplugin = "5.0.0"
esplugin = "6.0.0"
nom = "7.0.0"
pelite = "0.10.0"
regex = "1.10.5"
+2 -1
View File
@@ -4,6 +4,7 @@ use std::hash::Hasher;
use std::io::{BufRead, BufReader};
use std::path::Path;
use esplugin::ParseOptions;
use regex::Regex;
use super::path::{has_plugin_file_extension, normalise_file_name, resolve_path};
@@ -137,7 +138,7 @@ fn evaluate_is_master(state: &State, file_path: &Path) -> Result<bool, Error> {
let mut plugin = esplugin::Plugin::new(game_id, &path);
plugin
.parse_file(true)
.parse_file(ParseOptions::header_only())
.map(|_| plugin.is_master_file())
.or(Ok(false))
}