mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 13:07:46 +00:00
Use a PHF map for util_map()
Rather than building a HashMap at compile time, use the phf (and phf_codegen) crate to build the map at compile time in build.rs
This commit is contained in:
parent
57dc11e586
commit
bb41f4ffe5
5 changed files with 96 additions and 81 deletions
|
@ -247,6 +247,7 @@ test = [ "uu_test" ]
|
|||
[dependencies]
|
||||
clap = { version = "3.0", features = ["wrap_help", "cargo"] }
|
||||
clap_complete = "3.0"
|
||||
phf = "0.10.1"
|
||||
lazy_static = { version="1.3" }
|
||||
textwrap = { version="0.14", features=["terminal_size"] }
|
||||
uucore = { version=">=0.0.11", package="uucore", path="src/uucore" }
|
||||
|
@ -387,6 +388,9 @@ nix = "0.23.1"
|
|||
rust-users = { version="0.10", package="users" }
|
||||
unix_socket = "0.5.0"
|
||||
|
||||
[build-dependencies]
|
||||
phf_codegen = "0.10.0"
|
||||
|
||||
[[bin]]
|
||||
name = "coreutils"
|
||||
path = "src/bin/coreutils.rs"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue