diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2023-04-23 00:53:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-23 00:53:21 -0400 |
commit | 109498c1db4154e2388fb500ba61cf76e7f49549 (patch) | |
tree | 84e6c0289fdc1983b88481f086dcab7851e9ee2f | |
parent | a00ab46c5e7ec55b33fa2e8e5b2d6b40aa3ba9a6 (diff) |
deps: remove const_format dependency (#1114)
* deps: remove const_format dependency
I was importing it for just one use case, but I could just define the
const string manually and not pull it in at all.
* update husky entry
-rw-r--r-- | Cargo.lock | 27 | ||||
-rw-r--r-- | Cargo.toml | 7 | ||||
-rw-r--r-- | src/widgets/process_table.rs | 5 |
3 files changed, 3 insertions, 36 deletions
@@ -153,7 +153,6 @@ dependencies = [ "clap_complete", "clap_mangen", "concat-string", - "const_format", "core-foundation", "crossterm", "ctrlc", @@ -293,26 +292,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7439becb5fafc780b6f4de382b1a7a3e70234afe783854a4702ee8adbb838609" [[package]] -name = "const_format" -version = "0.2.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7309d9b4d3d2c0641e018d449232f2e28f1b22933c137f157d3dbc14228b8c0e" -dependencies = [ - "const_format_proc_macros", -] - -[[package]] -name = "const_format_proc_macros" -version = "0.2.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f47bf7270cf70d370f8f98c1abb6d2d4cf60a6845d30e05bfb90c6568650" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] name = "core-foundation" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1394,12 +1373,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - -[[package]] name = "uom" version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -77,7 +77,6 @@ backtrace = "0.3.67" cfg-if = "1.0.0" clap = { version = "4.2.4", features = ["default", "cargo", "wrap_help"] } concat-string = "1.0.1" -const_format = "0.2.30" crossterm = "0.26.1" ctrlc = { version = "3.2.5", features = ["termination"] } # dhat = "0.3.2" @@ -132,13 +131,9 @@ filedescriptor = "0.8.2" [dev-dependencies] assert_cmd = "2.0.10" +cargo-husky = { version = "1.5.0", default-features = false, features = ["user-hooks"] } predicates = "3.0.2" -[dev-dependencies.cargo-husky] -version = "1.5.0" -default-features = false -features = ["user-hooks"] - [build-dependencies] clap = { version = "4.2.4", features = ["default", "cargo", "wrap_help"] } clap_complete = "4.2.0" diff --git a/src/widgets/process_table.rs b/src/widgets/process_table.rs index 78b5823d..d378d091 100644 --- a/src/widgets/process_table.rs +++ b/src/widgets/process_table.rs @@ -1,6 +1,5 @@ use std::{borrow::Cow, collections::BTreeMap}; -use const_format::formatcp; use hashbrown::{HashMap, HashSet}; use itertools::Itertools; @@ -274,9 +273,9 @@ impl ProcWidgetState { &self, collapsed_pids: &HashSet<Pid>, data_collection: &DataCollection, ) -> Vec<ProcWidgetData> { const BRANCH_END: char = '└'; - const BRANCH_VERTICAL: char = '│'; const BRANCH_SPLIT: char = '├'; const BRANCH_HORIZONTAL: char = '─'; + const SPACED_BRANCH_VERTICAL: &str = "│ "; let search_query = self.get_query(); let is_using_command = self.is_using_command(); @@ -487,7 +486,7 @@ impl ProcWidgetState { prefixes.push(if is_last { " " } else { - formatcp!("{} ", BRANCH_VERTICAL) + SPACED_BRANCH_VERTICAL }); } |