diff --git a/Cargo.lock b/Cargo.lock index 570b08e..2e7eff1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,18 +23,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -115,35 +103,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "anyhow" -version = "1.0.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" - -[[package]] -name = "arc-swap" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" - -[[package]] -name = "arraydeque" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" - -[[package]] -name = "async-trait" -version = "0.1.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "autocfg" version = "1.4.0" @@ -165,12 +124,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -201,7 +154,7 @@ dependencies = [ "serde", "serde_yaml", "syntect", - "thiserror 1.0.69", + "thiserror", "unicode-width 0.1.14", ] @@ -245,15 +198,6 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - [[package]] name = "bstr" version = "1.11.3" @@ -261,7 +205,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" dependencies = [ "memchr", - "regex-automata 0.4.9", "serde", ] @@ -300,7 +243,7 @@ dependencies = [ "polling", "rustix", "slab", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -315,38 +258,6 @@ dependencies = [ "wayland-client", ] -[[package]] -name = "camino" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8769706aad5d996120af43197bf46ef6ad0fda35216b4505f926a365a232d924" -dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", - "thiserror 2.0.11", -] - [[package]] name = "cassowary" version = "0.3.0" @@ -470,12 +381,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "clru" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd0f76e066e64fdc5631e3bb46381254deab9ef1158292f27c8c57e3bf3fe59" - [[package]] name = "color-eyre" version = "0.6.3" @@ -533,25 +438,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "config" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68578f196d2a33ff61b27fae256c3164f65e36382648e30666dde05b8cc9dfdf" -dependencies = [ - "async-trait", - "convert_case", - "json5", - "nom", - "pathdiff", - "ron", - "rust-ini", - "serde", - "serde_json", - "toml", - "yaml-rust2", -] - [[package]] name = "console" version = "0.15.10" @@ -565,26 +451,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "const-random" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" -dependencies = [ - "const-random-macro", -] - -[[package]] -name = "const-random-macro" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" -dependencies = [ - "getrandom", - "once_cell", - "tiny-keccak", -] - [[package]] name = "content_inspector" version = "0.2.4" @@ -594,15 +460,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "convert_case" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "copypasta" version = "0.10.1" @@ -617,15 +474,6 @@ dependencies = [ "x11-clipboard", ] -[[package]] -name = "cpufeatures" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" -dependencies = [ - "libc", -] - [[package]] name = "crc32fast" version = "1.4.2" @@ -729,16 +577,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - [[package]] name = "cursor-icon" version = "1.1.0" @@ -789,37 +627,6 @@ dependencies = [ "powerfmt", ] -[[package]] -name = "derive_builder" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "derive_builder_macro" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" -dependencies = [ - "derive_builder_core", - "syn", -] - [[package]] name = "devicons" version = "0.6.12" @@ -829,16 +636,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - [[package]] name = "directories" version = "5.0.1" @@ -860,17 +657,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "dlib" version = "0.5.2" @@ -880,27 +666,12 @@ dependencies = [ "libloading", ] -[[package]] -name = "dlv-list" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" -dependencies = [ - "const-random", -] - [[package]] name = "downcast-rs" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - [[package]] name = "either" version = "1.13.0" @@ -948,15 +719,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "faster-hex" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" -dependencies = [ - "serde", -] - [[package]] name = "fastrand" version = "2.3.0" @@ -970,22 +732,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e" dependencies = [ "libc", - "thiserror 1.0.69", + "thiserror", "winapi", ] -[[package]] -name = "filetime" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" -dependencies = [ - "cfg-if", - "libc", - "libredox", - "windows-sys 0.59.0", -] - [[package]] name = "flate2" version = "1.0.35" @@ -1008,15 +758,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - [[package]] name = "gag" version = "1.0.0" @@ -1027,16 +768,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - [[package]] name = "gethostname" version = "0.4.3" @@ -1064,578 +795,6 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" -[[package]] -name = "gix" -version = "0.69.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d0eebdaecdcf405d5433a36f85e4f058cf4de48ee2604388be0dbccbaad353e" -dependencies = [ - "gix-actor", - "gix-commitgraph", - "gix-config", - "gix-date", - "gix-diff", - "gix-discover", - "gix-features", - "gix-fs", - "gix-glob", - "gix-hash", - "gix-hashtable", - "gix-index", - "gix-lock", - "gix-object", - "gix-odb", - "gix-pack", - "gix-path", - "gix-protocol", - "gix-ref", - "gix-refspec", - "gix-revision", - "gix-revwalk", - "gix-sec", - "gix-shallow", - "gix-tempfile", - "gix-trace", - "gix-traverse", - "gix-url", - "gix-utils", - "gix-validate", - "once_cell", - "parking_lot", - "signal-hook", - "smallvec", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-actor" -version = "0.33.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20018a1a6332e065f1fcc8305c1c932c6b8c9985edea2284b3c79dc6fa3ee4b2" -dependencies = [ - "bstr", - "gix-date", - "gix-utils", - "itoa", - "thiserror 2.0.11", - "winnow", -] - -[[package]] -name = "gix-bitmap" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1db9765c69502650da68f0804e3dc2b5f8ccc6a2d104ca6c85bc40700d37540" -dependencies = [ - "thiserror 2.0.11", -] - -[[package]] -name = "gix-chunk" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b1f1d8764958699dc764e3f727cef280ff4d1bd92c107bbf8acd85b30c1bd6f" -dependencies = [ - "thiserror 2.0.11", -] - -[[package]] -name = "gix-command" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb410b84d6575db45e62025a9118bdbf4d4b099ce7575a76161e898d9ca98df1" -dependencies = [ - "bstr", - "gix-path", - "gix-trace", - "shell-words", -] - -[[package]] -name = "gix-commitgraph" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8da6591a7868fb2b6dabddea6b09988b0b05e0213f938dbaa11a03dd7a48d85" -dependencies = [ - "bstr", - "gix-chunk", - "gix-features", - "gix-hash", - "memmap2", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-config" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6649b406ca1f99cb148959cf00468b231f07950f8ec438cc0903cda563606f19" -dependencies = [ - "bstr", - "gix-config-value", - "gix-features", - "gix-glob", - "gix-path", - "gix-ref", - "gix-sec", - "memchr", - "once_cell", - "smallvec", - "thiserror 2.0.11", - "unicode-bom", - "winnow", -] - -[[package]] -name = "gix-config-value" -version = "0.14.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11365144ef93082f3403471dbaa94cfe4b5e72743bdb9560719a251d439f4cee" -dependencies = [ - "bitflags 2.8.0", - "bstr", - "gix-path", - "libc", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-date" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c57c477b645ee248b173bb1176b52dd528872f12c50375801a58aaf5ae91113f" -dependencies = [ - "bstr", - "itoa", - "jiff", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-diff" -version = "0.49.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8e92566eccbca205a0a0f96ffb0327c061e85bc5c95abbcddfe177498aa04f6" -dependencies = [ - "bstr", - "gix-hash", - "gix-object", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-discover" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bf6dfa4e266a4a9becb4d18fc801f92c3f7cc6c433dd86fdadbcf315ffb6ef" -dependencies = [ - "bstr", - "dunce", - "gix-fs", - "gix-hash", - "gix-path", - "gix-ref", - "gix-sec", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-features" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d85d673f2e022a340dba4713bed77ef2cf4cd737d2f3e0f159d45e0935fd81f" -dependencies = [ - "crc32fast", - "flate2", - "gix-hash", - "gix-trace", - "gix-utils", - "libc", - "once_cell", - "prodash", - "sha1_smol", - "thiserror 2.0.11", - "walkdir", -] - -[[package]] -name = "gix-fs" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3d4fac505a621f97e5ce2c69fdc425742af00c0920363ca4074f0eb48b1db9" -dependencies = [ - "fastrand", - "gix-features", - "gix-utils", -] - -[[package]] -name = "gix-glob" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf69a6bec0a3581567484bf99a4003afcaf6c469fd4214352517ea355cf3435" -dependencies = [ - "bitflags 2.8.0", - "bstr", - "gix-features", - "gix-path", -] - -[[package]] -name = "gix-hash" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5eccc17194ed0e67d49285e4853307e4147e95407f91c1c3e4a13ba9f4e4ce" -dependencies = [ - "faster-hex", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-hashtable" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef65b256631078ef733bc5530c4e6b1c2e7d5c2830b75d4e9034ab3997d18fe" -dependencies = [ - "gix-hash", - "hashbrown 0.14.5", - "parking_lot", -] - -[[package]] -name = "gix-index" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "270645fd20556b64c8ffa1540d921b281e6994413a0ca068596f97e9367a257a" -dependencies = [ - "bitflags 2.8.0", - "bstr", - "filetime", - "fnv", - "gix-bitmap", - "gix-features", - "gix-fs", - "gix-hash", - "gix-lock", - "gix-object", - "gix-traverse", - "gix-utils", - "gix-validate", - "hashbrown 0.14.5", - "itoa", - "libc", - "memmap2", - "rustix", - "smallvec", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-lock" -version = "15.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd3ab68a452db63d9f3ebdacb10f30dba1fa0d31ac64f4203d395ed1102d940" -dependencies = [ - "gix-tempfile", - "gix-utils", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-object" -version = "0.46.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42d58010183ef033f31088479b4eb92b44fe341b35b62d39eb8b185573d77ea" -dependencies = [ - "bstr", - "gix-actor", - "gix-date", - "gix-features", - "gix-hash", - "gix-hashtable", - "gix-path", - "gix-utils", - "gix-validate", - "itoa", - "smallvec", - "thiserror 2.0.11", - "winnow", -] - -[[package]] -name = "gix-odb" -version = "0.66.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb780eceb3372ee204469478de02eaa34f6ba98247df0186337e0333de97d0ae" -dependencies = [ - "arc-swap", - "gix-date", - "gix-features", - "gix-fs", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-pack", - "gix-path", - "gix-quote", - "parking_lot", - "tempfile", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-pack" -version = "0.56.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4158928929be29cae7ab97afc8e820a932071a7f39d8ba388eed2380c12c566c" -dependencies = [ - "clru", - "gix-chunk", - "gix-features", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-path", - "memmap2", - "smallvec", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-packetline" -version = "0.18.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e5ae6bc3ac160a6bf44a55f5537813ca3ddb08549c0fd3e7ef699c73c439cd" -dependencies = [ - "bstr", - "faster-hex", - "gix-trace", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-path" -version = "0.10.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c40f12bb65a8299be0cfb90fe718e3be236b7a94b434877012980863a883a99f" -dependencies = [ - "bstr", - "gix-trace", - "home", - "once_cell", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-protocol" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c84642e8b6fed7035ce9cc449593019c55b0ec1af7a5dce1ab8a0636eaaeb067" -dependencies = [ - "bstr", - "gix-date", - "gix-features", - "gix-hash", - "gix-ref", - "gix-shallow", - "gix-transport", - "gix-utils", - "maybe-async", - "thiserror 2.0.11", - "winnow", -] - -[[package]] -name = "gix-quote" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e49357fccdb0c85c0d3a3292a9f6db32d9b3535959b5471bb9624908f4a066c6" -dependencies = [ - "bstr", - "gix-utils", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-ref" -version = "0.49.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91b61776c839d0f1b7114901179afb0947aa7f4d30793ca1c56d335dfef485f" -dependencies = [ - "gix-actor", - "gix-features", - "gix-fs", - "gix-hash", - "gix-lock", - "gix-object", - "gix-path", - "gix-tempfile", - "gix-utils", - "gix-validate", - "memmap2", - "thiserror 2.0.11", - "winnow", -] - -[[package]] -name = "gix-refspec" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00c056bb747868c7eb0aeb352c9f9181ab8ca3d0a2550f16470803500c6c413d" -dependencies = [ - "bstr", - "gix-hash", - "gix-revision", - "gix-validate", - "smallvec", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-revision" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e1ddc474405a68d2ce8485705dd72fe6ce959f2f5fe718601ead5da2c8f9e7" -dependencies = [ - "bitflags 2.8.0", - "bstr", - "gix-commitgraph", - "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-revwalk", - "gix-trace", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-revwalk" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510026fc32f456f8f067d8f37c34088b97a36b2229d88a6a5023ef179fcb109d" -dependencies = [ - "gix-commitgraph", - "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", - "smallvec", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-sec" -version = "0.10.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d84dae13271f4313f8d60a166bf27e54c968c7c33e2ffd31c48cafe5da649875" -dependencies = [ - "bitflags 2.8.0", - "gix-path", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "gix-shallow" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2673242e87492cb6ff671f0c01f689061ca306c4020f137197f3abc84ce01" -dependencies = [ - "bstr", - "gix-hash", - "gix-lock", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-tempfile" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2feb86ef094cc77a4a9a5afbfe5de626897351bbbd0de3cb9314baf3049adb82" -dependencies = [ - "gix-fs", - "libc", - "once_cell", - "parking_lot", - "signal-hook", - "signal-hook-registry", - "tempfile", -] - -[[package]] -name = "gix-trace" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c396a2036920c69695f760a65e7f2677267ccf483f25046977d87e4cb2665f7" - -[[package]] -name = "gix-transport" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d91e507a8713cfa2318d5a85d75b36e53a40379cc7eb7634ce400ecacbaf" -dependencies = [ - "bstr", - "gix-command", - "gix-features", - "gix-packetline", - "gix-quote", - "gix-sec", - "gix-url", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-traverse" -version = "0.43.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed47d648619e23e93f971d2bba0d10c1100e54ef95d2981d609907a8cabac89" -dependencies = [ - "bitflags 2.8.0", - "gix-commitgraph", - "gix-date", - "gix-hash", - "gix-hashtable", - "gix-object", - "gix-revwalk", - "smallvec", - "thiserror 2.0.11", -] - -[[package]] -name = "gix-url" -version = "0.28.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d096fb733ba6bd3f5403dba8bd72bdd8809fe2b347b57844040b8f49c93492d9" -dependencies = [ - "bstr", - "gix-features", - "gix-path", - "percent-encoding", - "thiserror 2.0.11", - "url", -] - -[[package]] -name = "gix-utils" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff08f24e03ac8916c478c8419d7d3c33393da9bb41fa4c24455d5406aeefd35f" -dependencies = [ - "fastrand", - "unicode-normalization", -] - -[[package]] -name = "gix-validate" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eaa01c3337d885617c0a42e92823922a2aea71f4caeace6fe87002bdcadbd90" -dependencies = [ - "bstr", - "thiserror 2.0.11", -] - [[package]] name = "globset" version = "0.4.15" @@ -1659,16 +818,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] - [[package]] name = "hashbrown" version = "0.15.2" @@ -1680,15 +829,6 @@ dependencies = [ "foldhash", ] -[[package]] -name = "hashlink" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" -dependencies = [ - "hashbrown 0.14.5", -] - [[package]] name = "heck" version = "0.5.0" @@ -1726,151 +866,12 @@ dependencies = [ "uuid", ] -[[package]] -name = "icu_collections" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locid" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" - -[[package]] -name = "icu_normalizer" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "utf16_iter", - "utf8_iter", - "write16", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" - -[[package]] -name = "icu_properties" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locid_transform", - "icu_properties_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" - -[[package]] -name = "icu_provider" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "ident_case" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - [[package]] name = "ignore" version = "0.4.23" @@ -1900,7 +901,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", - "hashbrown 0.15.2", + "hashbrown", ] [[package]] @@ -1963,35 +964,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" -[[package]] -name = "jiff" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2bb0c2e28117985a4d90e3bc70092bc8f226f434c7ec7e23dd9ff99c5c5721a" -dependencies = [ - "jiff-tzdb-platform", - "log", - "portable-atomic", - "portable-atomic-util", - "serde", - "windows-sys 0.59.0", -] - -[[package]] -name = "jiff-tzdb" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2cec2f5d266af45a071ece48b1fb89f3b00b2421ac3a5fe10285a6caaa60d3" - -[[package]] -name = "jiff-tzdb-platform" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a63c62e404e7b92979d2792352d885a7f8f83fd1d0d31eea582d77b2ceca697e" -dependencies = [ - "jiff-tzdb", -] - [[package]] name = "js-sys" version = "0.3.77" @@ -2002,17 +974,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "json5" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1" -dependencies = [ - "pest", - "pest_derive", - "serde", -] - [[package]] name = "lazy-bytes-cast" version = "5.0.1" @@ -2049,7 +1010,6 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.8.0", "libc", - "redox_syscall", ] [[package]] @@ -2058,12 +1018,6 @@ version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" -[[package]] -name = "litemap" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" - [[package]] name = "lock_api" version = "0.4.12" @@ -2086,7 +1040,7 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.15.2", + "hashbrown", ] [[package]] @@ -2107,17 +1061,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "maybe-async" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "memchr" version = "2.7.4" @@ -2234,15 +1177,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_threads" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" -dependencies = [ - "libc", -] - [[package]] name = "objc" version = "0.2.7" @@ -2321,16 +1255,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "ordered-multimap" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" -dependencies = [ - "dlv-list", - "hashbrown 0.14.5", -] - [[package]] name = "os_info" version = "3.9.2" @@ -2392,63 +1316,6 @@ dependencies = [ "std_prelude", ] -[[package]] -name = "pathdiff" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pest" -version = "2.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" -dependencies = [ - "memchr", - "thiserror 2.0.11", - "ucd-trie", -] - -[[package]] -name = "pest_derive" -version = "2.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816518421cfc6887a0d62bf441b6ffb4536fcc926395a69e1a85852d4363f57e" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d1396fd3a870fc7838768d171b4616d5c91f6cc25e377b673d714567d99377b" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pest_meta" -version = "2.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea" -dependencies = [ - "once_cell", - "pest", - "sha2", -] - [[package]] name = "pin-project-lite" version = "0.2.16" @@ -2467,7 +1334,7 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" dependencies = [ - "base64 0.22.1", + "base64", "indexmap", "quick-xml 0.32.0", "serde", @@ -2517,21 +1384,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "portable-atomic" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" - -[[package]] -name = "portable-atomic-util" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" -dependencies = [ - "portable-atomic", -] - [[package]] name = "powerfmt" version = "0.2.0" @@ -2547,16 +1399,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prodash" -version = "29.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a266d8d6020c61a437be704c5e618037588e1985c7dbb7bf8d265db84cffe325" -dependencies = [ - "log", - "parking_lot", -] - [[package]] name = "quick-xml" version = "0.32.0" @@ -2643,7 +1485,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -2699,28 +1541,6 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "ron" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" -dependencies = [ - "base64 0.21.7", - "bitflags 2.8.0", - "serde", - "serde_derive", -] - -[[package]] -name = "rust-ini" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0698206bcb8882bf2a9ecb4c1e7785db57ff052297085a6efd4fe42302068a" -dependencies = [ - "cfg-if", - "ordered-multimap", -] - [[package]] name = "rustc-demangle" version = "0.1.24" @@ -2733,15 +1553,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - [[package]] name = "rustix" version = "0.38.43" @@ -2793,9 +1604,6 @@ name = "semver" version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" -dependencies = [ - "serde", -] [[package]] name = "serde" @@ -2851,23 +1659,6 @@ dependencies = [ "unsafe-libyaml", ] -[[package]] -name = "sha1_smol" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "sharded-slab" version = "0.1.7" @@ -2877,12 +1668,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shell-words" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" - [[package]] name = "shlex" version = "1.3.0" @@ -2954,7 +1739,7 @@ dependencies = [ "log", "memmap2", "rustix", - "thiserror 1.0.69", + "thiserror", "wayland-backend", "wayland-client", "wayland-csd-frame", @@ -2986,12 +1771,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] name = "static_assertions" version = "1.1.0" @@ -3043,17 +1822,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "syntect" version = "5.2.0" @@ -3070,7 +1838,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "thiserror 1.0.69", + "thiserror", "walkdir", ] @@ -3082,7 +1850,6 @@ dependencies = [ "better-panic", "clap", "color-eyre", - "config", "copypasta", "criterion", "crossterm", @@ -3105,13 +1872,12 @@ dependencies = [ "strum", "syntect", "television-derive", - "thiserror 1.0.69", + "thiserror", "tokio", "toml", "tracing", "tracing-subscriber", "unicode-width 0.2.0", - "vergen-gix", "winapi-util", ] @@ -3144,16 +1910,7 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" -dependencies = [ - "thiserror-impl 2.0.11", + "thiserror-impl", ] [[package]] @@ -3167,17 +1924,6 @@ dependencies = [ "syn", ] -[[package]] -name = "thiserror-impl" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "thread_local" version = "1.1.8" @@ -3196,9 +1942,7 @@ checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", - "libc", "num-conv", - "num_threads", "powerfmt", "serde", "time-core", @@ -3221,25 +1965,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinystr" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" -dependencies = [ - "displaydoc", - "zerovec", -] - [[package]] name = "tinytemplate" version = "1.2.1" @@ -3250,21 +1975,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "tinyvec" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" version = "1.43.0" @@ -3400,39 +2110,12 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "ucd-trie" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" - -[[package]] -name = "unicode-bom" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217" - [[package]] name = "unicode-ident" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -3468,29 +2151,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" -[[package]] -name = "url" -version = "2.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - [[package]] name = "utf8parse" version = "0.2.2" @@ -3512,54 +2172,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" -[[package]] -name = "vergen" -version = "9.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0d2f179f8075b805a43a2a21728a46f0cc2921b3c58695b28fa8817e103cd9a" -dependencies = [ - "anyhow", - "cargo_metadata", - "derive_builder", - "regex", - "rustc_version", - "rustversion", - "time", - "vergen-lib", -] - -[[package]] -name = "vergen-gix" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b218ac3c56c2c31227bd7813735bfa51eb0dc5212e6d4bab6eac7c8208e5b66" -dependencies = [ - "anyhow", - "derive_builder", - "gix", - "rustversion", - "time", - "vergen", - "vergen-lib", -] - -[[package]] -name = "vergen-lib" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b07e6010c0f3e59fcb164e0163834597da68d1f864e2b8ca49f74de01e9c166" -dependencies = [ - "anyhow", - "derive_builder", - "rustversion", -] - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - [[package]] name = "walkdir" version = "2.5.0" @@ -3928,18 +2540,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - -[[package]] -name = "writeable" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" - [[package]] name = "x11-clipboard" version = "0.9.3" @@ -3978,101 +2578,3 @@ name = "xkeysym" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" - -[[package]] -name = "yaml-rust2" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8902160c4e6f2fb145dbe9d6760a75e3c9522d8bf796ed7047c85919ac7115f8" -dependencies = [ - "arraydeque", - "encoding_rs", - "hashlink", -] - -[[package]] -name = "yoke" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zerofrom" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerovec" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] diff --git a/Cargo.toml b/Cargo.toml index 8664882..8211801 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,24 +5,22 @@ edition = "2021" description = "The revolution will be televised." license = "MIT" authors = ["Alexandre Pasmantier "] -build = "build.rs" repository = "https://github.com/alexpasmantier/television" homepage = "https://github.com/alexpasmantier/television" keywords = ["search", "fuzzy", "preview", "tui", "terminal"] categories = [ - "command-line-utilities", - "command-line-interface", - "concurrency", - "development-tools", + "command-line-utilities", + "command-line-interface", + "concurrency", + "development-tools", ] include = [ - "LICENSE", - "README.md", - "themes/**/*.toml", - "television/**", - "build.rs", - ".config/config.toml", - "cable", + "LICENSE", + "README.md", + "themes/**/*.toml", + "television/**", + ".config/config.toml", + "cable", ] rust-version = "1.81" @@ -43,15 +41,14 @@ rustc-hash = "2.1" syntect = { version = "5.2", default-features = false } unicode-width = "0.2" clap = { version = "4.5", default-features = false, features = [ - "std", - "derive", - "cargo", - "string", + "std", + "derive", + "cargo", + "string", ] } serde = { version = "1.0", features = ["derive"] } ratatui = { version = "0.29", features = ["serde", "macros"] } better-panic = "0.3" -config = "0.14" signal-hook = "0.3" human-panic = "2.0" copypasta = "0.10" @@ -88,9 +85,6 @@ name = "tv" name = "results_list_benchmark" harness = false -[build-dependencies] -vergen-gix = { version = "1.0", features = ["build", "cargo", "rustc"] } - [target.'cfg(target_os = "macos")'.dependencies] crossterm = { version = "0.28.1", features = ["serde", "use-dev-tty"] } diff --git a/build.rs b/build.rs deleted file mode 100644 index 80abc16..0000000 --- a/build.rs +++ /dev/null @@ -1,14 +0,0 @@ -use std::error::Error; - -use vergen_gix::{BuildBuilder, CargoBuilder, Emitter, RustcBuilder}; - -fn main() -> Result<(), Box> { - let build = BuildBuilder::default().build_date(true).build()?; - let cargo = CargoBuilder::default().target_triple(true).build()?; - let rustc = RustcBuilder::default().semver(true).build()?; - Ok(Emitter::default() - .add_instructions(&build)? - .add_instructions(&cargo)? - .add_instructions(&rustc)? - .emit()?) -} diff --git a/television/cli.rs b/television/cli.rs index 44a925d..66d6e2d 100644 --- a/television/cli.rs +++ b/television/cli.rs @@ -292,16 +292,7 @@ fn delimiter_parser(s: &str) -> Result { }) } -const VERSION_MESSAGE: &str = concat!( - env!("CARGO_PKG_VERSION"), - "\ntarget triple: ", - env!("VERGEN_CARGO_TARGET_TRIPLE"), - "\nbuild: ", - env!("VERGEN_RUSTC_SEMVER"), - " (", - env!("VERGEN_BUILD_DATE"), - ")" -); +const VERSION_MESSAGE: &str = env!("CARGO_PKG_VERSION"); pub fn version() -> String { let author = clap::crate_authors!(); diff --git a/television/config/keybindings.rs b/television/config/keybindings.rs index 4743799..282a560 100644 --- a/television/config/keybindings.rs +++ b/television/config/keybindings.rs @@ -29,10 +29,10 @@ impl Display for Binding { } #[derive(Clone, Debug, Default)] -pub struct KeyBindings(pub config::Map>); +pub struct KeyBindings(pub FxHashMap>); impl Deref for KeyBindings { - type Target = config::Map>; + type Target = FxHashMap>; fn deref(&self) -> &Self::Target { &self.0 } @@ -44,6 +44,31 @@ impl DerefMut for KeyBindings { } } +pub fn merge_keybindings( + mut keybindings: KeyBindings, + new_keybindings: &KeyBindings, +) -> KeyBindings { + for (mode, bindings) in new_keybindings.iter() { + for (action, binding) in bindings { + match keybindings.get_mut(mode) { + Some(mode_bindings) => { + mode_bindings.insert(action.clone(), binding.clone()); + } + None => { + keybindings.insert( + *mode, + [(action.clone(), binding.clone())] + .iter() + .cloned() + .collect(), + ); + } + } + } + } + keybindings +} + #[derive(Clone, Debug, Deserialize)] #[serde(untagged)] pub enum SerializedBinding { @@ -61,37 +86,38 @@ impl<'de> Deserialize<'de> for KeyBindings { FxHashMap, >::deserialize(deserializer)?; - let keybindings = parsed_map - .into_iter() - .map(|(mode, inner_map)| { - let converted_inner_map = inner_map - .into_iter() - .map(|(cmd, binding)| { - ( - cmd, - match binding { - SerializedBinding::SingleKey(key_str) => { - Binding::SingleKey( - parse_key(&key_str).unwrap(), - ) - } - SerializedBinding::MultipleKeys(keys_str) => { - Binding::MultipleKeys( + let keybindings: FxHashMap> = + parsed_map + .into_iter() + .map(|(mode, inner_map)| { + let converted_inner_map = inner_map + .into_iter() + .map(|(cmd, binding)| { + ( + cmd, + match binding { + SerializedBinding::SingleKey(key_str) => { + Binding::SingleKey( + parse_key(&key_str).unwrap(), + ) + } + SerializedBinding::MultipleKeys( + keys_str, + ) => Binding::MultipleKeys( keys_str .iter() .map(|key_str| { parse_key(key_str).unwrap() }) .collect(), - ) - } - }, - ) - }) - .collect(); - (mode, converted_inner_map) - }) - .collect(); + ), + }, + ) + }) + .collect(); + (mode, converted_inner_map) + }) + .collect(); Ok(KeyBindings(keybindings)) } diff --git a/television/config.rs b/television/config/mod.rs similarity index 66% rename from television/config.rs rename to television/config/mod.rs index 0abcfc8..c5dcedb 100644 --- a/television/config.rs +++ b/television/config/mod.rs @@ -1,14 +1,14 @@ #![allow(clippy::module_name_repetitions)] use std::{env, path::PathBuf}; -use color_eyre::Result; +use color_eyre::{eyre::Context, Result}; use directories::ProjectDirs; +use keybindings::merge_keybindings; pub use keybindings::{parse_key, Binding, KeyBindings}; use lazy_static::lazy_static; use previewers::PreviewersConfig; use serde::Deserialize; use shell_integration::ShellIntegrationConfig; -use styles::Styles; pub use themes::Theme; use tracing::{debug, warn}; use ui::UiConfig; @@ -16,18 +16,18 @@ use ui::UiConfig; mod keybindings; mod previewers; mod shell_integration; -mod styles; mod themes; mod ui; -const CONFIG: &str = include_str!("../.config/config.toml"); +const DEFAULT_CONFIG: &str = include_str!("../../.config/config.toml"); #[allow(dead_code, clippy::module_name_repetitions)] #[derive(Clone, Debug, Deserialize, Default)] +#[serde(deny_unknown_fields)] pub struct AppConfig { - #[serde(default)] + #[serde(default = "get_data_dir")] pub data_dir: PathBuf, - #[serde(default)] + #[serde(default = "get_config_dir")] pub config_dir: PathBuf, #[serde(default = "default_frame_rate")] pub frame_rate: f64, @@ -36,19 +36,23 @@ pub struct AppConfig { } #[allow(dead_code)] -#[derive(Clone, Debug, Default, Deserialize)] +#[derive(Clone, Debug, Deserialize)] +#[serde(deny_unknown_fields)] pub struct Config { + /// General application configuration #[allow(clippy::struct_field_names)] #[serde(default, flatten)] pub config: AppConfig, + /// Keybindings configuration #[serde(default)] pub keybindings: KeyBindings, - #[serde(default)] - pub styles: Styles, + /// UI configuration #[serde(default)] pub ui: UiConfig, + /// Previewers configuration #[serde(default)] pub previewers: PreviewersConfig, + /// Shell integration configuration #[serde(default)] pub shell_integration: ShellIntegrationConfig, } @@ -77,68 +81,40 @@ impl Config { #[allow(clippy::missing_panics_doc, clippy::missing_errors_doc)] pub fn new() -> Result { // Load the default_config values as base defaults - let default_config: Config = - toml::from_str(CONFIG).expect("default config should be valid"); + let default_config: Config = toml::from_str(DEFAULT_CONFIG) + .wrap_err("Error parsing default config")?; // initialize the config builder let data_dir = get_data_dir(); let config_dir = get_config_dir(); + std::fs::create_dir_all(&config_dir) .expect("Failed creating configuration directory"); std::fs::create_dir_all(&data_dir) .expect("Failed creating data directory"); - let mut builder = config::Config::builder() - .set_default("data_dir", data_dir.to_str().unwrap())? - .set_default("config_dir", config_dir.to_str().unwrap())? - .set_default("frame_rate", default_config.config.frame_rate)? - .set_default("tick_rate", default_config.config.tick_rate)? - .set_default("ui", default_config.ui.clone())? - .set_default("previewers", default_config.previewers.clone())? - .set_default("theme", default_config.ui.theme.clone())? - .set_default( - "shell_integration", - default_config.shell_integration.clone(), - )?; - - // Load the user's config file - let source = config::File::from(config_dir.join(CONFIG_FILE_NAME)) - .format(config::FileFormat::Toml) - .required(false); - builder = builder.add_source(source); - if config_dir.join(CONFIG_FILE_NAME).is_file() { debug!("Found config file at {:?}", config_dir); - let mut cfg: Self = builder.build()?.try_deserialize().unwrap(); - //.with_context(|| { - // format!( - // "Error parsing config file at {:?}", - // config_dir.join(CONFIG_FILE_NAME) - // ) - //})?; - for (mode, default_bindings) in default_config.keybindings.iter() { - let user_bindings = cfg.keybindings.entry(*mode).or_default(); - for (command, key) in default_bindings { - user_bindings - .entry(command.clone()) - .or_insert_with(|| key.clone()); - } - } + let path = config_dir.join(CONFIG_FILE_NAME); + let contents = std::fs::read_to_string(&path)?; - for (mode, default_styles) in default_config.styles.iter() { - let user_styles = cfg.styles.entry(*mode).or_default(); - for (style_key, style) in default_styles { - user_styles.entry(style_key.clone()).or_insert(*style); - } - } + let cfg: Config = toml::from_str(&contents) + .wrap_err(format!("error parsing config: {path:?}"))?; + + // merge keybindings with default keybindings + let keybindings = merge_keybindings( + default_config.keybindings, + &cfg.keybindings, + ); + let cfg = Config { keybindings, ..cfg }; debug!("Config: {:?}", cfg); Ok(cfg) } else { warn!("No config file found at {:?}, creating default configuration file at that location.", config_dir); // create the default configuration file in the user's config directory - std::fs::write(config_dir.join(CONFIG_FILE_NAME), CONFIG)?; + std::fs::write(config_dir.join(CONFIG_FILE_NAME), DEFAULT_CONFIG)?; Ok(default_config) } } diff --git a/television/config/previewers.rs b/television/config/previewers.rs index 1ea5f37..e4767ba 100644 --- a/television/config/previewers.rs +++ b/television/config/previewers.rs @@ -1,7 +1,4 @@ -use std::collections::HashMap; - use crate::preview::{previewers, PreviewerConfig}; -use config::ValueKind; use serde::Deserialize; #[derive(Clone, Debug, Deserialize, Default)] @@ -20,26 +17,11 @@ impl From for PreviewerConfig { } } -impl From for ValueKind { - fn from(val: PreviewersConfig) -> Self { - let mut m = HashMap::new(); - m.insert(String::from("basic"), val.basic.into()); - m.insert(String::from("file"), val.file.into()); - m.insert(String::from("env_var"), val.env_var.into()); - ValueKind::Table(m) - } -} - #[derive(Clone, Debug, Deserialize, Default)] pub struct BasicPreviewerConfig {} -impl From for ValueKind { - fn from(_val: BasicPreviewerConfig) -> Self { - ValueKind::Table(HashMap::new()) - } -} - #[derive(Clone, Debug, Deserialize)] +#[serde(default)] pub struct FilePreviewerConfig { //pub max_file_size: u64, pub theme: String, @@ -54,19 +36,5 @@ impl Default for FilePreviewerConfig { } } -impl From for ValueKind { - fn from(val: FilePreviewerConfig) -> Self { - let mut m = HashMap::new(); - m.insert(String::from("theme"), ValueKind::String(val.theme).into()); - ValueKind::Table(m) - } -} - #[derive(Clone, Debug, Deserialize, Default)] pub struct EnvVarPreviewerConfig {} - -impl From for ValueKind { - fn from(_val: EnvVarPreviewerConfig) -> Self { - ValueKind::Table(HashMap::new()) - } -} diff --git a/television/config/shell_integration.rs b/television/config/shell_integration.rs index cd757cb..4cf11c6 100644 --- a/television/config/shell_integration.rs +++ b/television/config/shell_integration.rs @@ -1,5 +1,3 @@ -use std::collections::HashMap; - use rustc_hash::FxHashMap; use serde::Deserialize; @@ -7,20 +5,3 @@ use serde::Deserialize; pub struct ShellIntegrationConfig { pub commands: FxHashMap, } - -impl From for config::ValueKind { - fn from(val: ShellIntegrationConfig) -> Self { - let mut m = HashMap::new(); - m.insert( - String::from("commands"), - config::ValueKind::Table( - val.commands - .into_iter() - .map(|(k, v)| (k, config::ValueKind::String(v).into())) - .collect(), - ) - .into(), - ); - config::ValueKind::Table(m) - } -} diff --git a/television/config/styles.rs b/television/config/styles.rs deleted file mode 100644 index 19a826a..0000000 --- a/television/config/styles.rs +++ /dev/null @@ -1,207 +0,0 @@ -use crate::screen::mode::Mode; -use ratatui::prelude::{Color, Modifier, Style}; -use rustc_hash::FxHashMap; -use serde::{Deserialize, Deserializer}; -use std::ops::{Deref, DerefMut}; - -#[derive(Clone, Debug, Default)] -pub struct Styles(pub FxHashMap>); - -impl Deref for Styles { - type Target = FxHashMap>; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl DerefMut for Styles { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } -} - -impl<'de> Deserialize<'de> for Styles { - fn deserialize(deserializer: D) -> color_eyre::Result - where - D: Deserializer<'de>, - { - let parsed_map = - FxHashMap::>::deserialize( - deserializer, - )?; - - let styles = parsed_map - .into_iter() - .map(|(mode, inner_map)| { - let converted_inner_map = inner_map - .into_iter() - .map(|(str, style)| (str, parse_style(&style))) - .collect(); - (mode, converted_inner_map) - }) - .collect(); - - Ok(Styles(styles)) - } -} - -pub fn parse_style(line: &str) -> Style { - let (foreground, background) = - line.split_at(line.to_lowercase().find("on ").unwrap_or(line.len())); - let foreground = process_color_string(foreground); - let background = process_color_string(&background.replace("on ", "")); - - let mut style = Style::default(); - if let Some(fg) = parse_color(&foreground.0) { - style = style.fg(fg); - } - if let Some(bg) = parse_color(&background.0) { - style = style.bg(bg); - } - style = style.add_modifier(foreground.1 | background.1); - style -} - -pub fn process_color_string(color_str: &str) -> (String, Modifier) { - let color = color_str - .replace("grey", "gray") - .replace("bright ", "") - .replace("bold ", "") - .replace("underline ", "") - .replace("inverse ", ""); - - let mut modifiers = Modifier::empty(); - if color_str.contains("underline") { - modifiers |= Modifier::UNDERLINED; - } - if color_str.contains("bold") { - modifiers |= Modifier::BOLD; - } - if color_str.contains("inverse") { - modifiers |= Modifier::REVERSED; - } - - (color, modifiers) -} - -#[allow(clippy::cast_possible_truncation)] -pub fn parse_color(s: &str) -> Option { - let s = s.trim_start(); - let s = s.trim_end(); - if s.contains("bright color") { - let s = s.trim_start_matches("bright "); - let c = s - .trim_start_matches("color") - .parse::() - .unwrap_or_default(); - Some(Color::Indexed(c.wrapping_shl(8))) - } else if s.contains("color") { - let c = s - .trim_start_matches("color") - .parse::() - .unwrap_or_default(); - Some(Color::Indexed(c)) - } else if s.contains("gray") { - let c = 232 - + s.trim_start_matches("gray") - .parse::() - .unwrap_or_default(); - Some(Color::Indexed(c)) - } else if s.contains("rgb") { - let red = - (s.as_bytes()[3] as char).to_digit(10).unwrap_or_default() as u8; - let green = - (s.as_bytes()[4] as char).to_digit(10).unwrap_or_default() as u8; - let blue = - (s.as_bytes()[5] as char).to_digit(10).unwrap_or_default() as u8; - let c = 16 + red * 36 + green * 6 + blue; - Some(Color::Indexed(c)) - } else if s == "bold black" { - Some(Color::Indexed(8)) - } else if s == "bold red" { - Some(Color::Indexed(9)) - } else if s == "bold green" { - Some(Color::Indexed(10)) - } else if s == "bold yellow" { - Some(Color::Indexed(11)) - } else if s == "bold blue" { - Some(Color::Indexed(12)) - } else if s == "bold magenta" { - Some(Color::Indexed(13)) - } else if s == "bold cyan" { - Some(Color::Indexed(14)) - } else if s == "bold white" { - Some(Color::Indexed(15)) - } else if s == "black" { - Some(Color::Indexed(0)) - } else if s == "red" { - Some(Color::Indexed(1)) - } else if s == "green" { - Some(Color::Indexed(2)) - } else if s == "yellow" { - Some(Color::Indexed(3)) - } else if s == "blue" { - Some(Color::Indexed(4)) - } else if s == "magenta" { - Some(Color::Indexed(5)) - } else if s == "cyan" { - Some(Color::Indexed(6)) - } else if s == "white" { - Some(Color::Indexed(7)) - } else { - None - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_parse_style_default() { - let style = parse_style(""); - assert_eq!(style, Style::default()); - } - - #[test] - fn test_parse_style_foreground() { - let style = parse_style("red"); - assert_eq!(style.fg, Some(Color::Indexed(1))); - } - - #[test] - fn test_parse_style_background() { - let style = parse_style("on blue"); - assert_eq!(style.bg, Some(Color::Indexed(4))); - } - - #[test] - fn test_parse_style_modifiers() { - let style = parse_style("underline red on blue"); - assert_eq!(style.fg, Some(Color::Indexed(1))); - assert_eq!(style.bg, Some(Color::Indexed(4))); - } - - #[test] - fn test_process_color_string() { - let (color, modifiers) = - process_color_string("underline bold inverse gray"); - assert_eq!(color, "gray"); - assert!(modifiers.contains(Modifier::UNDERLINED)); - assert!(modifiers.contains(Modifier::BOLD)); - assert!(modifiers.contains(Modifier::REVERSED)); - } - - #[test] - fn test_parse_color_rgb() { - let color = parse_color("rgb123"); - let expected = 16 + 36 + 2 * 6 + 3; - assert_eq!(color, Some(Color::Indexed(expected))); - } - - #[test] - fn test_parse_color_unknown() { - let color = parse_color("unknown"); - assert_eq!(color, None); - } -} diff --git a/television/config/ui.rs b/television/config/ui.rs index fddd459..75bc3b6 100644 --- a/television/config/ui.rs +++ b/television/config/ui.rs @@ -1,6 +1,3 @@ -use std::collections::HashMap; - -use config::ValueKind; use serde::Deserialize; use crate::screen::layout::{InputPosition, PreviewTitlePosition}; @@ -10,6 +7,7 @@ use super::themes::DEFAULT_THEME; const DEFAULT_UI_SCALE: u16 = 100; #[derive(Clone, Debug, Deserialize)] +#[serde(default)] pub struct UiConfig { pub use_nerd_font_icons: bool, pub ui_scale: u16, @@ -34,39 +32,3 @@ impl Default for UiConfig { } } } - -impl From for ValueKind { - fn from(val: UiConfig) -> Self { - let mut m = HashMap::new(); - m.insert( - String::from("use_nerd_font_icons"), - ValueKind::Boolean(val.use_nerd_font_icons).into(), - ); - m.insert( - String::from("ui_scale"), - ValueKind::U64(val.ui_scale.into()).into(), - ); - m.insert( - String::from("show_help_bar"), - ValueKind::Boolean(val.show_help_bar).into(), - ); - m.insert( - String::from("show_preview_panel"), - ValueKind::Boolean(val.show_preview_panel).into(), - ); - m.insert( - String::from("input_position"), - ValueKind::String(val.input_bar_position.to_string()).into(), - ); - m.insert( - String::from("preview_title_position"), - match val.preview_title_position { - Some(pos) => ValueKind::String(pos.to_string()), - None => ValueKind::Nil, - } - .into(), - ); - m.insert(String::from("theme"), ValueKind::String(val.theme).into()); - ValueKind::Table(m) - } -} diff --git a/television/logging.rs b/television/logging.rs index 9d19643..9436d3c 100644 --- a/television/logging.rs +++ b/television/logging.rs @@ -1,14 +1,14 @@ use color_eyre::Result; use tracing_subscriber::{fmt, prelude::*, EnvFilter}; -use crate::config; +use crate::config::get_data_dir; lazy_static::lazy_static! { pub static ref LOG_FILE: String = format!("{}.log", env!("CARGO_PKG_NAME")); } pub fn init() -> Result<()> { - let directory = config::get_data_dir(); + let directory = get_data_dir(); std::fs::create_dir_all(directory.clone())?; let log_path = directory.join(LOG_FILE.clone()); let log_file = std::fs::File::create(log_path)?; diff --git a/television/screen/metadata.rs b/television/screen/metadata.rs index 8a6484c..97b157f 100644 --- a/television/screen/metadata.rs +++ b/television/screen/metadata.rs @@ -40,40 +40,6 @@ pub fn build_metadata_table<'a>( )), ]); - let target_triple_row = Row::new(vec![ - Cell::from(Span::styled( - "target triple: ", - Style::default().fg(colorscheme.help.metadata_field_name_fg), - )), - Cell::from(Span::styled( - &app_metadata.build.target_triple, - Style::default().fg(colorscheme.help.metadata_field_value_fg), - )), - ]); - - let build_row = Row::new(vec![ - Cell::from(Span::styled( - "build: ", - Style::default().fg(colorscheme.help.metadata_field_name_fg), - )), - Cell::from(Span::styled( - &app_metadata.build.rustc_version, - Style::default().fg(colorscheme.help.metadata_field_value_fg), - )), - Cell::from(Span::styled( - " (", - Style::default().fg(colorscheme.help.metadata_field_name_fg), - )), - Cell::from(Span::styled( - &app_metadata.build.build_date, - Style::default().fg(colorscheme.help.metadata_field_value_fg), - )), - Cell::from(Span::styled( - ")", - Style::default().fg(colorscheme.help.metadata_field_name_fg), - )), - ]); - let current_dir_row = Row::new(vec![ Cell::from(Span::styled( "current directory: ", @@ -115,8 +81,6 @@ pub fn build_metadata_table<'a>( Table::new( vec![ version_row, - target_triple_row, - build_row, current_dir_row, current_channel_row, current_mode_row, diff --git a/television/television.rs b/television/television.rs index 625a170..1a447a8 100644 --- a/television/television.rs +++ b/television/television.rs @@ -21,7 +21,7 @@ use crate::screen::preview::draw_preview_content_block; use crate::screen::remote_control::draw_remote_control; use crate::screen::results::draw_results_list; use crate::screen::spinner::{Spinner, SpinnerState}; -use crate::utils::metadata::{AppMetadata, BuildMetadata}; +use crate::utils::metadata::AppMetadata; use crate::utils::strings::EMPTY_STRING; use crate::{cable::load_cable_channels, keymap::Keymap}; use color_eyre::Result; @@ -75,11 +75,6 @@ impl Television { let app_metadata = AppMetadata::new( env!("CARGO_PKG_VERSION").to_string(), - BuildMetadata::new( - env!("VERGEN_RUSTC_SEMVER").to_string(), - env!("VERGEN_BUILD_DATE").to_string(), - env!("VERGEN_CARGO_TARGET_TRIPLE").to_string(), - ), std::env::current_dir() .expect("Could not get current directory") .to_string_lossy() diff --git a/television/utils/metadata.rs b/television/utils/metadata.rs index bca00c3..a729b2f 100644 --- a/television/utils/metadata.rs +++ b/television/utils/metadata.rs @@ -1,38 +1,12 @@ -pub struct BuildMetadata { - pub rustc_version: String, - pub build_date: String, - pub target_triple: String, -} - -impl BuildMetadata { - pub fn new( - rustc_version: String, - build_date: String, - target_triple: String, - ) -> Self { - Self { - rustc_version, - build_date, - target_triple, - } - } -} - pub struct AppMetadata { pub version: String, - pub build: BuildMetadata, pub current_directory: String, } impl AppMetadata { - pub fn new( - version: String, - build: BuildMetadata, - current_directory: String, - ) -> Self { + pub fn new(version: String, current_directory: String) -> Self { Self { version, - build, current_directory, } }