diff --git a/Cargo.lock b/Cargo.lock index fe5c76bc..53f2709f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -63,6 +63,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "aho-corasick" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +dependencies = [ + "memchr", +] + [[package]] name = "alloc-no-stdlib" version = "2.0.4" @@ -1576,7 +1585,7 @@ version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" dependencies = [ - "aho-corasick", + "aho-corasick 0.7.20", "bstr", "fnv", "log", @@ -3308,7 +3317,7 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" dependencies = [ - "aho-corasick", + "aho-corasick 0.7.20", "memchr", "regex-syntax", ] @@ -4368,7 +4377,7 @@ dependencies = [ name = "tauri-plugin-persisted-scope" version = "0.1.0" dependencies = [ - "aho-corasick", + "aho-corasick 1.0.1", "bincode", "log", "serde", diff --git a/plugins/persisted-scope/Cargo.toml b/plugins/persisted-scope/Cargo.toml index fa6784c2..4e1f24d0 100644 --- a/plugins/persisted-scope/Cargo.toml +++ b/plugins/persisted-scope/Cargo.toml @@ -15,7 +15,7 @@ serde_json.workspace = true tauri.workspace = true log.workspace = true thiserror.workspace = true -aho-corasick = "0.7" +aho-corasick = "1.0" bincode = "1" [features] diff --git a/plugins/persisted-scope/src/lib.rs b/plugins/persisted-scope/src/lib.rs index b7ac5dde..fe2cddf1 100644 --- a/plugins/persisted-scope/src/lib.rs +++ b/plugins/persisted-scope/src/lib.rs @@ -101,7 +101,7 @@ pub fn init() -> TauriPlugin { // We're trying to fix broken .persisted-scope files seamlessly, so we'll be running this on the values read on the saved file. // We will still save some semi-broken values because the scope events are quite spammy and we don't want to reduce runtime performance any further. - let ac = AhoCorasick::new_auto_configured(PATTERNS); + let ac = AhoCorasick::new(PATTERNS).unwrap(/* This should be impossible to fail since we're using a small static input */); if scope_state_path.exists() { let scope: Scope = tauri::api::file::read_binary(&scope_state_path)