Skip to content

Commit

Permalink
Merge pull request #28 from Crypto-Spartan/v2.2.0
Browse files Browse the repository at this point in the history
V2.2.0
  • Loading branch information
Crypto-Spartan authored Apr 24, 2024
2 parents 40f1757 + 357ccf9 commit c77384d
Show file tree
Hide file tree
Showing 17 changed files with 1,826 additions and 1,578 deletions.
1,244 changes: 479 additions & 765 deletions Cargo.lock

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
[package]
name = "unifi-search-tool"
version = "2.1.5"
version = "2.2.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
egui = "0.26"
eframe = "0.26"
flume = "0.11"
image = "0.25"
chrono = { version = "0.4", features=["serde"] }
egui = { version = "0.27", features = ["extra_debug_asserts"] }
eframe = "0.27"
flume = { version = "0.11", default-features = false }
image = { version = "0.25", default-features = false, features=["ico"] }
once_cell = "1.19"
regex-automata = { version = "0.4", default-features = false, features=["std", "perf", "dfa"] }
reqwest = {version = "0.11", features = ["blocking", "cookies", "json"]}
reqwest = {version = "0.12", default-features = false, features = ["rustls-tls-native-roots", "blocking", "cookies", "json", "zstd"]}
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_repr = "0.1"
serde_with = "3.7"
simd-json = "0.13"
thiserror = "1.0"
zeroize = "1.6"

[target.'cfg(windows)'.build-dependencies]
Expand Down
16 changes: 12 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() -> io::Result<()> {
embed_resource::compile("icon.rc", embed_resource::NONE);
}

let mac_addr_validation_dir = "src/mac_addr_validation";
let mac_addr_validation_dir = "src/mac_address/validation";
fs::create_dir_all(mac_addr_validation_dir).unwrap();

let nfa_config = thompson::NFA::config()
Expand Down Expand Up @@ -55,11 +55,13 @@ fn main() -> io::Result<()> {

let autogenerated_mod_string = "\
// DO NOT EDIT THIS FILE. IT WAS AUTOMATICALLY GENERATED BY THE BUILD SCRIPT\n\n\
use once_cell::sync::Lazy;\n\
use regex_automata::{\n\
\tdfa::dense,\n\
\tdfa::{dense, Automaton},\n\
\tutil::wire::AlignAs,\n\
\tAnchored, Input,\n\
};\n\
use once_cell::sync::Lazy;\n\n\
\n\
pub static MAC_ADDR_REGEX: Lazy<dense::DFA<&'static [u32]>> = Lazy::new(|| {\n\
\tstatic ALIGNED: &AlignAs<[u8], u32> = &AlignAs {\n\
\t\t_align: [],\n\
Expand All @@ -71,7 +73,13 @@ fn main() -> io::Result<()> {
\tlet (dense_dfa, _) = dense::DFA::from_bytes(&ALIGNED.bytes)\
.expect(\"serialized dense::DFA should be valid\");\n\
\tdense_dfa\n\
});";
});\n\
\n\
pub(crate) fn text_is_valid_mac<S: AsRef<[u8]>>(text: S) -> bool {\n\
\tMAC_ADDR_REGEX\n\
\t\t.try_search_fwd(&Input::new(&text).anchored(Anchored::Yes).earliest(true))\n\
\t\t.map_or(false, |x| x.is_some())\n\
}";

fs::write(
format!("{mac_addr_validation_dir}/mod.rs"),
Expand Down
Loading

0 comments on commit c77384d

Please sign in to comment.