diff --git a/Cargo.lock b/Cargo.lock index 1179a490..350fbb9f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,22 +1,16 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -68,21 +62,21 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "arboard" -version = "3.4.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb4009533e8ff8f1450a5bcbc30f4242a1d34442221f72314bea1f5dc9c7f89" +checksum = "df099ccb16cd014ff054ac1bf392c67feeef57164b05c42f037cd40f5d4357f4" dependencies = [ "clipboard-win", "core-graphics", @@ -98,10 +92,10 @@ dependencies = [ ] [[package]] -name = "arrayvec" -version = "0.5.2" +name = "arraydeque" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" [[package]] name = "ascii-canvas" @@ -112,6 +106,17 @@ dependencies = [ "term", ] +[[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 = "atomic-waker" version = "1.1.2" @@ -120,23 +125,23 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -145,6 +150,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" +[[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" @@ -157,7 +168,7 @@ version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "cexpr", "clang-sys", "lazy_static", @@ -194,9 +205,12 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" +dependencies = [ + "serde", +] [[package]] name = "block" @@ -224,9 +238,9 @@ dependencies = [ [[package]] name = "buffered-reader" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd098763fdb64579407a8c83cf0d751e6d4a7e161d0114c89cc181a2ca760ec8" +checksum = "fabd1c5e55587a8e8526172d63ad2ba665fa18c8acb39ec9a77af1708c982b9b" dependencies = [ "bzip2", "flate2", @@ -248,9 +262,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.17.1" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" [[package]] name = "byteorder" @@ -266,15 +280,15 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.7.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "bzip2" -version = "0.4.4" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +checksum = "bafdbf26611df8c14810e268ddceda071c297570a5fb360ceddf617fe417ef58" dependencies = [ "bzip2-sys", "libc", @@ -293,42 +307,41 @@ dependencies = [ [[package]] name = "cairo-rs" -version = "0.19.4" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ac2a4d0e69036cf0062976f6efcba1aaee3e448594e6514bb2ddf87acce562" +checksum = "ae50b5510d86cf96ac2370e66d8dc960882f3df179d6a5a1e52bd94a1416c0f7" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "cairo-sys-rs", "glib", "libc", - "thiserror", ] [[package]] name = "cairo-sys-rs" -version = "0.19.2" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3bb3119664efbd78b5e6c93957447944f16bdbced84c17a9f41c7829b81e64" +checksum = "f18b6bb8e43c7eb0f2aac7976afe0c61b6f5fc2ab7bc4c139537ea56c92290df" dependencies = [ "glib-sys", "libc", - "system-deps", + "system-deps 7.0.3", ] [[package]] name = "capnp" -version = "0.19.6" +version = "0.19.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de71387912cac7dd3cb7c219e09628411620a18061bba58c71453c26ae7bf66a" +checksum = "4e985a566bdaae9a428a957d12b10c318d41b2afddb54cfbb764878059df636e" dependencies = [ "embedded-io", ] [[package]] name = "capnp-futures" -version = "0.19.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fac483cb34e3bc0be251dba7ce318f465143dd18f948c7bd7ad035f6fecfb1b" +checksum = "f8f3ee810b3890498e51028448ac732cdd5009223897124dd2fac6b085b5d867" dependencies = [ "capnp", "futures", @@ -336,9 +349,9 @@ dependencies = [ [[package]] name = "capnp-rpc" -version = "0.19.4" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f09758ec79a2825c9bc87cbe1c8ded306c99a83b52cf89577667ebff2d3ff7" +checksum = "fe57ab22a5e121e6fddaf36e837514aab9ae888bcff2baa6fda5630820dfc501" dependencies = [ "capnp", "capnp-futures", @@ -362,9 +375,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.16" +version = "1.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9d013ecb737093c0e86b151a7b837993cf9ec6c502946cfb44bedc392421e0b" +checksum = "ad0cf6e91fde44c773c6ee7ec6bba798504641a8bc2eb7e37a04ffbf4dfaa55a" dependencies = [ "jobserver", "libc", @@ -377,7 +390,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "nom 7.1.3", + "nom", ] [[package]] @@ -390,6 +403,16 @@ dependencies = [ "target-lexicon", ] +[[package]] +name = "cfg-expr" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d4ba6e40bd1184518716a6e1a781bf9160e286d219ccdb8ab2612e74cfe4789" +dependencies = [ + "smallvec", + "target-lexicon", +] + [[package]] name = "cfg-if" version = "1.0.0" @@ -404,14 +427,14 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", - "num-traits 0.2.19", + "num-traits", "wasm-bindgen", "windows-targets 0.52.6", ] @@ -424,7 +447,7 @@ checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" dependencies = [ "ciborium-io", "ciborium-ll", - "serde 1.0.209", + "serde", ] [[package]] @@ -456,18 +479,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.16" +version = "4.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" +checksum = "a8eb5e908ef3a6efbe1ed62520fb7287959888c88485abe072543190ecc66783" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.15" +version = "4.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" +checksum = "96b01801b5fc6a0a232407abc821660c9c6d25a1cafc0d4f85f29fb8d9afc121" dependencies = [ "anstyle", "clap_lex", @@ -475,9 +498,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "clipboard-win" @@ -490,9 +513,9 @@ dependencies = [ [[package]] name = "compact_str" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6050c3a16ddab2e412160b31f2c871015704239bca62f72f6e5f0be631d3f644" +checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32" dependencies = [ "castaway", "cfg-if", @@ -504,18 +527,41 @@ dependencies = [ [[package]] name = "config" -version = "0.11.0" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1b9d958c2b1368a663f05538fc1b5975adce1e19f435acceae987aceeeb369" +checksum = "38bdefe0c9ee4fe0e613bf6d5cc55dfdb12198fb48518fec0706b358e7485d8c" dependencies = [ - "lazy_static", - "nom 5.1.3", + "async-trait", + "convert_case", + "json5", + "pathdiff", + "ron", "rust-ini", - "serde 1.0.209", - "serde-hjson", + "serde", "serde_json", - "toml 0.5.11", - "yaml-rust", + "toml", + "winnow", + "yaml-rust2", +] + +[[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]] @@ -533,6 +579,15 @@ dependencies = [ "custom_derive", ] +[[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 = "core-foundation" version = "0.9.4" @@ -575,9 +630,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -604,13 +659,13 @@ dependencies = [ "criterion-plot", "is-terminal", "itertools 0.10.5", - "num-traits 0.2.19", + "num-traits", "once_cell", "oorandom", "plotters", "rayon", "regex", - "serde 1.0.209", + "serde", "serde_derive", "serde_json", "tinytemplate", @@ -629,18 +684,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -657,9 +712,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crossterm" @@ -667,7 +722,7 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "crossterm_winapi", "mio", "parking_lot", @@ -714,9 +769,9 @@ dependencies = [ [[package]] name = "ctor" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" +checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" dependencies = [ "quote", "syn", @@ -768,7 +823,7 @@ dependencies = [ "parking_lot", "serde_json", "time", - "toml 0.8.19", + "toml", "unicode-segmentation", "unicode-width", "xi-unicode", @@ -907,6 +962,15 @@ 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" @@ -1006,9 +1070,9 @@ checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -1062,31 +1126,31 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "error-code" -version = "3.2.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b" +checksum = "a5d9305ccc6942a704f4335694ecd3de2ea531b114ac2d51f5f843750787a92f" [[package]] name = "fastrand" -version = "2.1.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fdeflate" -version = "0.3.4" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" dependencies = [ "simd-adler32", ] @@ -1121,12 +1185,12 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -1198,9 +1262,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1213,9 +1277,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1223,15 +1287,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1240,15 +1304,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -1257,21 +1321,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1287,9 +1351,9 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.19.8" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624eaba126021103c7339b2e179ae4ee8cdab842daab419040710f38ed9f8699" +checksum = "b6efc7705f7863d37b12ad6974cbb310d35d054f5108cdc1e69037742f573c4c" dependencies = [ "gdk-pixbuf-sys", "gio", @@ -1299,22 +1363,22 @@ dependencies = [ [[package]] name = "gdk-pixbuf-sys" -version = "0.19.8" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4efa05a4f83c8cc50eb4d883787b919b85e5f1d8dd10b5a1df53bf5689782379" +checksum = "67f2587c9202bf997476bbba6aaed4f78a11538a2567df002a5f57f5331d0b5c" dependencies = [ "gio-sys", "glib-sys", "gobject-sys", "libc", - "system-deps", + "system-deps 7.0.3", ] [[package]] name = "gdk4" -version = "0.8.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db265c9dd42d6a371e09e52deab3a84808427198b86ac792d75fd35c07990a07" +checksum = "d0196720118f880f71fe7da971eff58cc43a89c9cf73f46076b7cb1e60889b15" dependencies = [ "cairo-rs", "gdk-pixbuf", @@ -1327,9 +1391,9 @@ dependencies = [ [[package]] name = "gdk4-sys" -version = "0.8.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9418fb4e8a67074919fe7604429c45aa74eb9df82e7ca529767c6d4e9dc66dd" +checksum = "60b0e1340bd15e7a78810cf39fed9e5d85f0a8f80b1d999d384ca17dcc452b60" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -1339,7 +1403,7 @@ dependencies = [ "libc", "pango-sys", "pkg-config", - "system-deps", + "system-deps 7.0.3", ] [[package]] @@ -1354,9 +1418,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96512db27971c2c3eece70a1e106fbe6c87760234e31e8f7e5634912fe52794a" +checksum = "2cb8bc4c28d15ade99c7e90b219f30da4be5c88e586277e8cbe886beeb868ab2" dependencies = [ "typenum", ] @@ -1396,15 +1460,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "gio" -version = "0.19.8" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c49f117d373ffcc98a35d114db5478bc223341cff53e39a5d6feced9e2ddffe" +checksum = "a517657589a174be9f60c667f1fec8b7ac82ed5db4ebf56cf073a3b5955d8e2e" dependencies = [ "futures-channel", "futures-core", @@ -1415,29 +1479,28 @@ dependencies = [ "libc", "pin-project-lite", "smallvec", - "thiserror", ] [[package]] name = "gio-sys" -version = "0.19.8" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd743ba4714d671ad6b6234e8ab2a13b42304d0e13ab7eba1dcdd78a7d6d4ef" +checksum = "8446d9b475730ebef81802c1738d972db42fde1c5a36a627ebc4d665fc87db04" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps", - "windows-sys 0.52.0", + "system-deps 7.0.3", + "windows-sys 0.59.0", ] [[package]] name = "git2" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" +checksum = "3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "libc", "libgit2-sys", "log", @@ -1448,11 +1511,11 @@ dependencies = [ [[package]] name = "glib" -version = "0.19.9" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39650279f135469465018daae0ba53357942a5212137515777d5fdca74984a44" +checksum = "f969edf089188d821a30cde713b6f9eb08b20c63fc2e584aba2892a7984a8cc0" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "futures-channel", "futures-core", "futures-executor", @@ -1465,23 +1528,22 @@ dependencies = [ "libc", "memchr", "smallvec", - "thiserror", ] [[package]] name = "glib-build-tools" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "108f374fff60efd14b0d70d8916e7213aed18d7dd071ba3e9334ed2dac1dc86a" +checksum = "7029c2651d9b5d5a3eea93ec8a1995665c6d3a69ce9bf6042ad9064d134736d8" dependencies = [ "gio", ] [[package]] name = "glib-macros" -version = "0.19.9" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4429b0277a14ae9751350ad9b658b1be0abb5b54faa5bcdf6e74a3372582fad7" +checksum = "715601f8f02e71baef9c1f94a657a9a77c192aea6097cf9ae7e5e177cd8cde68" dependencies = [ "heck", "proc-macro-crate", @@ -1492,36 +1554,36 @@ dependencies = [ [[package]] name = "glib-sys" -version = "0.19.8" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c2dc18d3a82b0006d470b13304fbbb3e0a9bd4884cf985a60a7ed733ac2c4a5" +checksum = "b360ff0f90d71de99095f79c526a5888c9c92fc9ee1b19da06c6f5e75f0c2a53" dependencies = [ "libc", - "system-deps", + "system-deps 7.0.3", ] [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "gobject-sys" -version = "0.19.8" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e697e252d6e0416fd1d9e169bda51c0f1c926026c39ca21fbe8b1bb5c3b8b9e" +checksum = "67a56235e971a63bfd75abb13ef70064e1346388723422a68580d8a6fbac6423" dependencies = [ "glib-sys", "libc", - "system-deps", + "system-deps 7.0.3", ] [[package]] name = "gpg-error" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29dd79aa3d28d1759188a70e42f3084484d9933d7afd1a50decd84314b84caba" +checksum = "545aae14d0e95734d639c8076304e6e86de765c19c76bead3648583d9caed919" dependencies = [ "libgpg-error-sys", ] @@ -1554,15 +1616,15 @@ dependencies = [ "build-rs", "libc", "libgpg-error-sys", - "system-deps", + "system-deps 6.2.2", "winreg 0.10.1", ] [[package]] name = "graphene-rs" -version = "0.19.8" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb86031d24d9ec0a2a15978fc7a65d545a2549642cf1eb7c3dda358da42bcf" +checksum = "f39d3bcd2e24fd9c2874a56f277b72c03e728de9bdc95a8d4ef4c962f10ced98" dependencies = [ "glib", "graphene-sys", @@ -1571,21 +1633,21 @@ dependencies = [ [[package]] name = "graphene-sys" -version = "0.19.8" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f530e0944bccba4b55065e9c69f4975ad691609191ebac16e13ab8e1f27af05" +checksum = "11a68d39515bf340e879b72cecd4a25c1332557757ada6e8aba8654b4b81d23a" dependencies = [ "glib-sys", "libc", "pkg-config", - "system-deps", + "system-deps 7.0.3", ] [[package]] name = "gsk4" -version = "0.8.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7563884bf6939f4468e5d94654945bdd9afcaf8c3ba4c5dd17b5342b747221be" +checksum = "32b9188db0a6219e708b6b6e7225718e459def664023dbddb8395ca1486d8102" dependencies = [ "cairo-rs", "gdk4", @@ -1598,9 +1660,9 @@ dependencies = [ [[package]] name = "gsk4-sys" -version = "0.8.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23024bf2636c38bbd1f822f58acc9d1c25b28da896ff0f291a1a232d4272b3dc" +checksum = "bca10fc65d68528a548efa3d8747934adcbe7058b73695c9a7f43a25352fce14" dependencies = [ "cairo-sys-rs", "gdk4-sys", @@ -1609,14 +1671,14 @@ dependencies = [ "graphene-sys", "libc", "pango-sys", - "system-deps", + "system-deps 7.0.3", ] [[package]] name = "gtk4" -version = "0.8.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b04e11319b08af11358ab543105a9e49b0c491faca35e2b8e7e36bfba8b671ab" +checksum = "b697ff938136625f6acf75f01951220f47a45adcf0060ee55b4671cf734dac44" dependencies = [ "cairo-rs", "field-offset", @@ -1635,9 +1697,9 @@ dependencies = [ [[package]] name = "gtk4-macros" -version = "0.8.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec655a7ef88d8ce9592899deb8b2d0fa50bab1e6dd69182deb764e643c522408" +checksum = "0ed1786c4703dd196baf7e103525ce0cf579b3a63a0570fe653b7ee6bac33999" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1647,9 +1709,9 @@ dependencies = [ [[package]] name = "gtk4-sys" -version = "0.8.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c8aa86b7f85ea71d66ea88c1d4bae1cfacf51ca4856274565133838d77e57b5" +checksum = "3af4b680cee5d2f786a2f91f1c77e95ecf2254522f0ca4edf3a2dce6cb35cecf" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -1661,14 +1723,14 @@ dependencies = [ "gsk4-sys", "libc", "pango-sys", - "system-deps", + "system-deps 7.0.3", ] [[package]] name = "h2" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", "bytes", @@ -1698,18 +1760,30 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] [[package]] -name = "heck" -version = "0.5.0" +name = "hashbrown" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] -name = "hermit-abi" -version = "0.3.9" +name = "hashlink" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -1732,20 +1806,11 @@ dependencies = [ "digest", ] -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -1777,15 +1842,15 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" dependencies = [ "bytes", "futures-channel", @@ -1803,9 +1868,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.3" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", "http", @@ -1836,9 +1901,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -1849,16 +1914,15 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2003,54 +2067,53 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", ] [[package]] -name = "idna" -version = "1.0.2" +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd69211b9b519e98303c015e21a007e293db403b6c85b9b124e133d25e242cdd" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ "icu_normalizer", "icu_properties", - "smallvec", - "utf8_iter", ] [[package]] name = "image" -version = "0.25.2" +version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10" +checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" dependencies = [ "bytemuck", "byteorder-lite", - "num-traits 0.2.19", + "num-traits", "png", "tiff", ] [[package]] name = "indexmap" -version = "2.5.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.2", ] [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" @@ -2058,7 +2121,7 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.4.0", + "hermit-abi", "libc", "windows-sys 0.52.0", ] @@ -2083,9 +2146,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jobserver" @@ -2104,13 +2167,25 @@ checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ + "once_cell", "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 = "lalrpop" version = "0.20.2" @@ -2153,26 +2228,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" -[[package]] -name = "lexical-core" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" -dependencies = [ - "arrayvec", - "bitflags 1.3.2", - "cfg-if", - "ryu", - "static_assertions", -] - [[package]] name = "libadwaita" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91b4990248b9e1ec5e72094a2ccaea70ec3809f88f6fd52192f2af306b87c5d9" +checksum = "8611ee9fb85e7606c362b513afcaf5b59853f79e4d98caaaf581d99465014247" dependencies = [ - "gdk-pixbuf", "gdk4", "gio", "glib", @@ -2184,9 +2245,9 @@ dependencies = [ [[package]] name = "libadwaita-sys" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a748e4e92be1265cd9e93d569c0b5dfc7814107985aa6743d670ab281ea1a8" +checksum = "b099a223560118d4d4fa04b6d23f3ea5b7171fe1d83dfb7e6b45b54cdfc83af9" dependencies = [ "gdk4-sys", "gio-sys", @@ -2195,20 +2256,20 @@ dependencies = [ "gtk4-sys", "libc", "pango-sys", - "system-deps", + "system-deps 7.0.3", ] [[package]] name = "libc" -version = "0.2.158" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libgit2-sys" -version = "0.17.0+1.8.1" +version = "0.18.0+1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" +checksum = "e1a117465e7e1597e8febea8bb0c410f1c7fb93b1e1cddf34363f8390367ffec" dependencies = [ "cc", "libc", @@ -2220,20 +2281,20 @@ dependencies = [ [[package]] name = "libgpg-error-sys" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc23cc53e9b81f56330826fe36b6cc651543a7661748d5259f446de2ef4fdac9" +checksum = "500a4cbc0816ed820a5bcf73a19e74dd6df4bedeabc0f64471c61186938b6c82" dependencies = [ "build-rs", - "system-deps", + "system-deps 6.2.2", "winreg 0.52.0", ] [[package]] name = "libloading" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", "windows-targets 0.52.6", @@ -2245,7 +2306,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "libc", "redox_syscall", ] @@ -2266,9 +2327,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.20" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" +checksum = "df9b68e50e6e0b26f672573834882eb57759f6db9b3be2ea3c35c91188bb4eaa" dependencies = [ "cc", "libc", @@ -2276,23 +2337,17 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "litemap" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "locale_config" @@ -2319,9 +2374,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "3d6ea2a48c204030ee31a7d7fc72c93294c92fe87ecb1789881c9543516e1a0d" [[package]] name = "malloc_buf" @@ -2385,30 +2440,20 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", - "simd-adler32", -] - -[[package]] -name = "miniz_oxide" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" dependencies = [ "adler2", + "simd-adler32", ] [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi 0.3.9", "libc", "log", "wasi", @@ -2441,7 +2486,7 @@ dependencies = [ "getrandom", "libc", "nettle-sys", - "thiserror", + "thiserror 1.0.69", "typenum", ] @@ -2471,23 +2516,12 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "cfg-if", "cfg_aliases", "libc", ] -[[package]] -name = "nom" -version = "5.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08959a387a676302eebf4ddbcbc611da04285579f76f88ee0506c63b1a61dd4b" -dependencies = [ - "lexical-core", - "memchr", - "version_check", -] - [[package]] name = "nom" version = "7.1.3" @@ -2508,7 +2542,7 @@ dependencies = [ "num-integer", "num-iter", "num-rational", - "num-traits 0.2.19", + "num-traits", ] [[package]] @@ -2517,7 +2551,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ - "num-traits 0.2.19", + "num-traits", ] [[package]] @@ -2532,7 +2566,7 @@ version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "num-traits 0.2.19", + "num-traits", ] [[package]] @@ -2543,7 +2577,7 @@ checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", - "num-traits 0.2.19", + "num-traits", ] [[package]] @@ -2553,16 +2587,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ "num-integer", - "num-traits 0.2.19", -] - -[[package]] -name = "num-traits" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" -dependencies = [ - "num-traits 0.2.19", + "num-traits", ] [[package]] @@ -2625,7 +2650,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "block2", "libc", "objc2", @@ -2641,7 +2666,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "block2", "objc2", "objc2-foundation", @@ -2671,7 +2696,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "block2", "libc", "objc2", @@ -2683,7 +2708,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "block2", "objc2", "objc2-foundation", @@ -2695,7 +2720,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "block2", "objc2", "objc2-foundation", @@ -2713,18 +2738,18 @@ dependencies = [ [[package]] name = "object" -version = "0.36.4" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" @@ -2734,11 +2759,11 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "cfg-if", "foreign-types 0.3.2", "libc", @@ -2766,9 +2791,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -2782,6 +2807,16 @@ 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_pipe" version = "1.2.1" @@ -2794,9 +2829,9 @@ dependencies = [ [[package]] name = "pango" -version = "0.19.8" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f0d328648058085cfd6897c9ae4272884098a926f3a833cd50c8c73e6eccecd" +checksum = "9e89bd74250a03a05cec047b43465469102af803be2bf5e5a1088f8b8455e087" dependencies = [ "gio", "glib", @@ -2806,14 +2841,14 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.19.8" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff03da4fa086c0b244d4a4587d3e20622a3ecdb21daea9edf66597224c634ba0" +checksum = "71787e0019b499a5eda889279e4adb455a4f3fdd6870cd5ab7f4a5aa25df6699" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps", + "system-deps 7.0.3", ] [[package]] @@ -2839,6 +2874,12 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -2852,49 +2893,74 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] -name = "petgraph" -version = "0.6.5" +name = "pest" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ - "fixedbitset", - "indexmap", + "memchr", + "thiserror 2.0.11", + "ucd-trie", ] [[package]] -name = "phf_shared" -version = "0.10.0" +name = "pest_derive" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +checksum = "816518421cfc6887a0d62bf441b6ffb4536fcc926395a69e1a85852d4363f57e" dependencies = [ - "siphasher", + "pest", + "pest_generator", ] [[package]] -name = "pin-project" -version = "1.1.5" +name = "pest_generator" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "7d1396fd3a870fc7838768d171b4616d5c91f6cc25e377b673d714567d99377b" dependencies = [ - "pin-project-internal", + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "pin-project-internal" -version = "1.1.5" +name = "pest_meta" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea" dependencies = [ - "proc-macro2", - "quote", - "syn", + "once_cell", + "pest", + "sha2", +] + +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -2904,17 +2970,17 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plotters" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ - "num-traits 0.2.19", + "num-traits", "plotters-backend", "plotters-svg", "wasm-bindgen", @@ -2923,30 +2989,30 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] [[package]] name = "png" -version = "0.17.13" +version = "0.17.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" dependencies = [ "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", - "miniz_oxide 0.7.4", + "miniz_oxide", ] [[package]] @@ -2981,27 +3047,27 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" -version = "0.34.0" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f24d770aeca0eacb81ac29dfbc55ebcc09312fdd1f8bbecdc7e4a84e000e3b4" +checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -3058,11 +3124,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", ] [[package]] @@ -3073,14 +3139,14 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -3090,9 +3156,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -3101,17 +3167,17 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.7" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "encoding_rs", "futures-channel", @@ -3134,13 +3200,14 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustls-pemfile", - "serde 1.0.209", + "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", + "tower", "tower-service", "url", "wasm-bindgen", @@ -3181,11 +3248,10 @@ dependencies = [ "rand", "reqwest", "sequoia-gpg-agent", - "sequoia-ipc", "sequoia-openpgp", "tar", "tempfile", - "toml 0.8.19", + "toml", "totp-rs", "whoami", "zeroize", @@ -3208,7 +3274,6 @@ dependencies = [ "ripasso", "tempfile", "terminal_size", - "toml 0.8.19", "unic-langid", "zeroize", ] @@ -3234,11 +3299,28 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e33e4fb37ba46888052c763e4ec2acfedd8f00f62897b630cadb6298b833675e" +[[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.7.0", + "serde", + "serde_derive", +] + [[package]] name = "rust-ini" -version = "0.13.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" +checksum = "4e310ef0e1b6eeb79169a1171daf9abcb87a2e17c03bee2c4bb100b55c75409f" +dependencies = [ + "cfg-if", + "ordered-multimap", + "trim-in-place", +] [[package]] name = "rustc-demangle" @@ -3263,22 +3345,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.35" +version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8" dependencies = [ "once_cell", "rustls-pki-types", @@ -3289,25 +3371,24 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" [[package]] name = "rustls-webpki" -version = "0.102.7" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -3316,9 +3397,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" @@ -3337,11 +3418,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3362,7 +3443,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "core-foundation", "core-foundation-sys", "libc", @@ -3371,9 +3452,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -3381,9 +3462,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" [[package]] name = "sequoia-gpg-agent" @@ -3401,7 +3482,7 @@ dependencies = [ "sequoia-openpgp", "stfu8", "tempfile", - "thiserror", + "thiserror 1.0.69", "tokio", ] @@ -3426,7 +3507,7 @@ dependencies = [ "sequoia-openpgp", "socket2", "tempfile", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-util", "winapi", @@ -3434,19 +3515,19 @@ dependencies = [ [[package]] name = "sequoia-openpgp" -version = "1.21.2" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13261ee216b44d932ef93b2d4a75d45199bef77864bcc5b77ecfc7bc0ecb02d6" +checksum = "e858e4e9e48ff079cede92e1b45c942a5466ce9a4e3cc0c2a7e66586a718ef59" dependencies = [ "anyhow", - "base64", + "base64 0.22.1", "buffered-reader", "bzip2", "chrono", "dyn-clone", "flate2", "getrandom", - "idna 1.0.2", + "idna", "lalrpop", "lalrpop-util", "lazy_static", @@ -3457,42 +3538,24 @@ dependencies = [ "regex", "regex-syntax", "sha1collisiondetection", - "thiserror", + "thiserror 1.0.69", "xxhash-rust", ] [[package]] name = "serde" -version = "0.8.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" - -[[package]] -name = "serde" -version = "1.0.209" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] -[[package]] -name = "serde-hjson" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a3a4e0ea8a88553209f6cc6cfe8724ecad22e1acf372793c27d995290fe74f8" -dependencies = [ - "lazy_static", - "num-traits 0.1.43", - "regex", - "serde 0.8.23", -] - [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", @@ -3501,23 +3564,23 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" dependencies = [ "itoa", "memchr", "ryu", - "serde 1.0.209", + "serde", ] [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ - "serde 1.0.209", + "serde", ] [[package]] @@ -3529,7 +3592,7 @@ dependencies = [ "form_urlencoded", "itoa", "ryu", - "serde 1.0.209", + "serde", ] [[package]] @@ -3550,7 +3613,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f606421e4a6012877e893c399822a4ed4b089164c5969424e1b9d1e66e6964b" dependencies = [ "digest", - "generic-array 1.1.0", + "generic-array 1.1.1", ] [[package]] @@ -3629,9 +3692,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -3682,9 +3745,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.77" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -3693,9 +3756,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] @@ -3717,7 +3780,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "core-foundation", "system-configuration-sys", ] @@ -3738,18 +3801,31 @@ version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" dependencies = [ - "cfg-expr", + "cfg-expr 0.15.8", "heck", "pkg-config", - "toml 0.8.19", + "toml", + "version-compare", +] + +[[package]] +name = "system-deps" +version = "7.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66d23aaf9f331227789a99e8de4c91bf46703add012bdfd45fdecdfb2975a005" +dependencies = [ + "cfg-expr 0.17.2", + "heck", + "pkg-config", + "toml", "version-compare", ] [[package]] name = "tar" -version = "0.4.41" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" dependencies = [ "filetime", "libc", @@ -3764,12 +3840,13 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.12.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", + "getrandom", "once_cell", "rustix", "windows-sys 0.59.0", @@ -3798,18 +3875,38 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "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", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "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", @@ -3829,9 +3926,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -3839,7 +3936,7 @@ dependencies = [ "num-conv", "num_threads", "powerfmt", - "serde 1.0.209", + "serde", "time-core", "time-macros", ] @@ -3852,9 +3949,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", @@ -3885,30 +3982,15 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" dependencies = [ - "serde 1.0.209", + "serde", "serde_json", ] -[[package]] -name = "tinyvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" -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.40.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -3931,20 +4013,19 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ "rustls", - "rustls-pki-types", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -3954,22 +4035,13 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde 1.0.209", -] - [[package]] name = "toml" version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ - "serde 1.0.209", + "serde", "serde_spanned", "toml_datetime", "toml_edit", @@ -3981,17 +4053,17 @@ version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ - "serde 1.0.209", + "serde", ] [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", - "serde 1.0.209", + "serde", "serde_spanned", "toml_datetime", "winnow", @@ -4014,14 +4086,14 @@ dependencies = [ [[package]] name = "tower" -version = "0.4.13" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", - "pin-project", "pin-project-lite", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -4041,9 +4113,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-core", @@ -4051,27 +4123,32 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", ] [[package]] name = "tree_magic_mini" -version = "3.1.5" +version = "3.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469a727cac55b41448315cc10427c069c618ac59bb6a4480283fcd811749bdc2" +checksum = "aac5e8971f245c3389a5a76e648bfc80803ae066a1243a75db0064d7c1129d63" dependencies = [ "fnv", - "home", "memchr", - "nom 7.1.3", + "nom", "once_cell", "petgraph", ] +[[package]] +name = "trim-in-place" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "343e926fc669bc8cde4fa3129ab681c63671bae288b1f1081ceee6d9d37904fc" + [[package]] name = "try-lock" version = "0.2.5" @@ -4084,6 +4161,12 @@ 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 = "unic-langid" version = "0.9.5" @@ -4102,44 +4185,29 @@ dependencies = [ "tinystr", ] -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "untrusted" @@ -4149,12 +4217,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", - "idna 0.5.0", + "idna", "percent-encoding", ] @@ -4227,9 +4295,9 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", "once_cell", @@ -4238,13 +4306,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -4253,21 +4320,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4275,9 +4343,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", @@ -4288,15 +4356,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "wayland-backend" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90e11ce2ca99c97b940ee83edbae9da2d56a08f9ea8158550fd77fa31722993" +checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" dependencies = [ "cc", "downcast-rs", @@ -4308,11 +4376,11 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.5" +version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e321577a0a165911bdcfb39cf029302479d7527b517ee58ab0f6ad09edf0943" +checksum = "b66249d3fc69f76fd74c82cc319300faa554e9d865dab1f7cd66cc20db10b280" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "rustix", "wayland-backend", "wayland-scanner", @@ -4324,7 +4392,7 @@ version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -4336,7 +4404,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -4345,9 +4413,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.4" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7b56f89937f1cf2ee1f1259cf2936a17a1f45d8f0aa1019fae6d470d304cfa6" +checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" dependencies = [ "proc-macro2", "quick-xml", @@ -4356,9 +4424,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.31.4" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43676fe2daf68754ecf1d72026e4e6c15483198b5d24e888b74d3f22f887a148" +checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" dependencies = [ "dlib", "log", @@ -4367,9 +4435,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", @@ -4612,9 +4680,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" dependencies = [ "memchr", ] @@ -4650,7 +4718,7 @@ dependencies = [ "nix", "os_pipe", "tempfile", - "thiserror", + "thiserror 1.0.69", "tree_magic_mini", "wayland-backend", "wayland-client", @@ -4689,9 +4757,9 @@ checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" [[package]] name = "xattr" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +checksum = "e105d177a3871454f754b33bb0ee637ecaaac997446375fd3e5d43a2ed00c909" dependencies = [ "libc", "linux-raw-sys", @@ -4706,26 +4774,28 @@ checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a" [[package]] name = "xxhash-rust" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" +checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" [[package]] -name = "yaml-rust" -version = "0.4.5" +name = "yaml-rust2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +checksum = "2a1a1c0bc9823338a3bdf8c61f994f23ac004c6fa32c08cd152984499b445e8d" dependencies = [ - "linked-hash-map", + "arraydeque", + "encoding_rs", + "hashlink", ] [[package]] name = "yoke" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" dependencies = [ - "serde 1.0.209", + "serde", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -4733,9 +4803,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", @@ -4766,18 +4836,18 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 23e7875b..44e748c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ arboard = "3.4.0" glob = "0.3.1" gpgme = "0.11.0" chrono = { version = "0.4", default-features = false, features = ["clock"] } -git2 = "0.19.0" +git2 = "0.20.0" rand = "0.8.5" whoami = "1.4.1" toml = "0.8.10" @@ -22,12 +22,11 @@ hex = "0.4.3" totp-rs = { version = "5.5.1", features = ["otpauth"] } sequoia-openpgp = "1.21.0" anyhow = "1.0.80" -sequoia-ipc = "0.35.0" sequoia-gpg-agent = "0.4.0" zeroize = { version = "1.8.0", features = ["zeroize_derive", "alloc"] } [dependencies.config] -version = "0.11.0" +version = "0.15.4" default-features = false features = ["toml"] diff --git a/cursive/Cargo.toml b/cursive/Cargo.toml index f5508310..acedb7cb 100644 --- a/cursive/Cargo.toml +++ b/cursive/Cargo.toml @@ -18,13 +18,12 @@ locale_config = "0.3.0" unic-langid = "0.9.4" gettext = "0.4.0" lazy_static = "1.4.0" -toml = "0.8.10" terminal_size = "0.3.0" hex = "0.4.3" zeroize = { version = "1.7.0", features = ["zeroize_derive", "alloc"] } [dependencies.config] -version = "0.11.0" +version = "0.15.5" default-features = false features = ["toml"] diff --git a/cursive/src/helpers.rs b/cursive/src/helpers.rs index 8f034880..76f3fc13 100644 --- a/cursive/src/helpers.rs +++ b/cursive/src/helpers.rs @@ -56,7 +56,7 @@ pub fn set_clipboard(content: &String) -> Result<()> { Ok(CLIPBOARD.lock().unwrap().set_text(content)?) } -pub fn get_value_from_input(s: &mut Cursive, input_name: &str) -> Option> { +pub fn get_value_from_input(s: &mut Cursive, input_name: &str) -> Option> { let mut password = None; s.call_on_name(input_name, |e: &mut EditView| { password = Some(e.get_content()); diff --git a/cursive/src/main.rs b/cursive/src/main.rs index f9a3bbf9..9c2544fe 100644 --- a/cursive/src/main.rs +++ b/cursive/src/main.rs @@ -106,7 +106,7 @@ fn up(ui: &mut Cursive) { } fn page_down(ui: &mut Cursive) { - let rows = screen_height(&ui) - 7; + let rows = screen_height(ui) - 7; ui.call_on_name("results", |l: &mut SelectView| { l.select_down(rows); }); @@ -119,7 +119,7 @@ fn page_down(ui: &mut Cursive) { } fn page_up(ui: &mut Cursive) { - let rows = screen_height(&ui) - 7; + let rows = screen_height(ui) - 7; ui.call_on_name("results", |l: &mut SelectView| { l.select_up(rows); }); @@ -140,7 +140,7 @@ fn copy(ui: &mut Cursive, store: PasswordStoreType) { if sel.is_none() { return; } - if let Err(err) = || -> pass::Result<()> { + if let Err(err) = || -> Result<()> { let mut secret: String = sel.unwrap().secret(&*store.lock()?.lock()?)?; helpers::set_clipboard(&secret)?; secret.zeroize(); @@ -168,7 +168,7 @@ fn copy_first_line(ui: &mut Cursive, store: PasswordStoreType) { if sel.is_none() { return; } - if let Err(err) = || -> pass::Result<()> { + if let Err(err) = || -> Result<()> { let mut secret = sel.unwrap().password(&*store.lock()?.lock()?)?; helpers::set_clipboard(&secret)?; secret.zeroize(); @@ -198,7 +198,7 @@ fn copy_mfa(ui: &mut Cursive, store: PasswordStoreType) { if sel.is_none() { return; } - if let Err(err) = || -> pass::Result<()> { + if let Err(err) = || -> Result<()> { let mut secret = sel.unwrap().mfa(&*store.lock()?.lock()?)?; helpers::set_clipboard(&secret)?; secret.zeroize(); @@ -224,7 +224,7 @@ fn copy_name(ui: &mut Cursive) { } let sel = sel.unwrap(); - if let Err(err) = || -> pass::Result<()> { + if let Err(err) = || -> Result<()> { let name = sel.name.split('/').next_back(); helpers::set_clipboard(&name.unwrap_or("").to_string())?; Ok(()) @@ -281,8 +281,8 @@ fn delete(ui: &mut Cursive, store: PasswordStoreType) { )); } -fn get_selected_password_entry(ui: &mut Cursive) -> Option { - let password_entry_option: Option>> = ui +fn get_selected_password_entry(ui: &mut Cursive) -> Option { + let password_entry_option: Option>> = ui .call_on_name("results", |l: &mut SelectView| { l.selection() }); @@ -716,12 +716,12 @@ fn create(ui: &mut Cursive, store: PasswordStoreType) { fn delete_recipient(ui: &mut Cursive, store: PasswordStoreType) -> Result<()> { let mut l = ui - .find_name::>>("recipients") + .find_name::>>("recipients") .unwrap(); let sel = l.selection(); if sel.is_none() || sel.as_ref().unwrap().is_none() { - return Err(crate::pass::Error::Generic("Selection is empty")); + return Err(pass::Error::Generic("Selection is empty")); } let binding = sel.unwrap(); @@ -795,9 +795,7 @@ fn add_recipient(ui: &mut Cursive, store: PasswordStoreType, config_path: &Path) } let mut recipients_view = ui - .find_name::>>( - "recipients", - ) + .find_name::>>("recipients") .unwrap(); recipients_view.add_item( render_recipient_label(&recipient, max_width_key, max_width_name), @@ -870,7 +868,7 @@ fn add_recipient_dialog(ui: &mut Cursive, store: PasswordStoreType, config_path: } fn render_recipient_label( - recipient: &pass::Recipient, + recipient: &Recipient, max_width_key: usize, max_width_name: usize, ) -> String { @@ -929,7 +927,7 @@ fn view_recipients(ui: &mut Cursive, store: PasswordStoreType, config_path: &Pat helpers::errorbox(ui, &err); return Ok(()); } - let sub_dirs = sub_dirs.unwrap(); + let sub_dirs = sub_dirs?; match sub_dirs.len().cmp(&1) { std::cmp::Ordering::Greater => { @@ -942,7 +940,7 @@ fn view_recipients(ui: &mut Cursive, store: PasswordStoreType, config_path: &Pat return Ok(()); } - path_to_recipients.insert(dir.clone(), recipients_res.unwrap()); + path_to_recipients.insert(dir.clone(), recipients_res?); } view_recipients_for_many_dirs(ui, store, path_to_recipients, config_path); @@ -971,7 +969,7 @@ fn view_recipients_for_many_dirs( path_to_recipients: HashMap>, config_path: &Path, ) { - let mut recipients_view = SelectView::>::new() + let mut recipients_view = SelectView::>::new() .h_align(cursive::align::HAlign::Left) .with_name("recipients"); @@ -1048,9 +1046,9 @@ fn view_recipients_for_dir( helpers::errorbox(ui, &err); return Ok(()); } - let recipients = recipients_res.unwrap(); + let recipients = recipients_res?; - let mut recipients_view = SelectView::>::new() + let mut recipients_view = SelectView::>::new() .h_align(cursive::align::HAlign::Left) .with_name("recipients"); @@ -1108,10 +1106,7 @@ fn create_label(p: &pass::PasswordEntry, col: usize) -> String { let committed_by = p.committed_by.clone(); let updated = p.updated; let name = substr( - &match committed_by { - Some(d) => d, - None => CATALOG.gettext("n/a").to_string(), - }, + &committed_by.unwrap_or_else(|| CATALOG.gettext("n/a").to_string()), 0, 15, ); @@ -1377,21 +1372,17 @@ fn get_stores(config: &config::Config, home: &Option) -> Result = stores; for store_name in stores.keys() { - let store: HashMap = stores - .get(store_name) - .unwrap() - .clone() - .into_table() - .unwrap(); + let store: HashMap = + stores.get(store_name).unwrap().clone().into_table()?; let password_store_dir_opt = store.get("path"); let valid_signing_keys_opt = store.get("valid_signing_keys"); if let Some(store_dir) = password_store_dir_opt { - let password_store_dir = Some(PathBuf::from(store_dir.clone().into_str()?)); + let password_store_dir = Some(PathBuf::from(store_dir.clone().into_string()?)); let valid_signing_keys = match valid_signing_keys_opt { - Some(k) => match k.clone().into_str() { + Some(k) => match k.clone().into_string() { Err(_) => None, Ok(key) => { if key == "-1" { @@ -1404,7 +1395,7 @@ fn get_stores(config: &config::Config, home: &Option) -> Result None, }; let style_path_opt = match store.get("style_path") { - Some(path) => match path.clone().into_str() { + Some(path) => match path.clone().into_string() { Ok(p) => Some(PathBuf::from(p)), Err(_err) => None, }, @@ -1412,14 +1403,14 @@ fn get_stores(config: &config::Config, home: &Option) -> Result CryptoImpl::try_from(pgp_str.clone().into_str()?.as_str()), + Some(pgp_str) => CryptoImpl::try_from(pgp_str.clone().into_string()?.as_str()), None => Ok(CryptoImpl::GpgMe), }?; let own_fingerprint = store.get("own_fingerprint"); let own_fingerprint = match own_fingerprint { None => None, - Some(k) => match k.clone().into_str() { + Some(k) => match k.clone().into_string() { Err(_) => None, Ok(key) => match <[u8; 20]>::from_hex(key) { Err(_) => None, @@ -1477,11 +1468,11 @@ fn validate_stores_config(settings: &config::Config, home: &Option) -> let password_store_dir_opt = store.get("path"); if let Some(p) = password_store_dir_opt { - let p_path = PathBuf::from(p.clone().into_str().unwrap()); + let p_path = PathBuf::from(p.clone().into_string().unwrap()); let gpg_id = p_path.clone().join(".gpg-id"); if !p_path.exists() || !gpg_id.exists() { - incomplete_stores.push(PathBuf::from(p.clone().into_str().unwrap())); + incomplete_stores.push(PathBuf::from(p.clone().into_string().unwrap())); } } } @@ -1520,8 +1511,7 @@ fn save_edit_config( let e_k = if e_k_bool { let mut recipients: Vec = vec![]; - for (i, r) in all_recipients_from_stores(stores.clone()) - .unwrap() + for (i, r) in all_recipients_from_stores(stores.clone())? .iter() .enumerate() { @@ -1563,7 +1553,7 @@ fn save_edit_config( helpers::errorbox(ui, &err); return Ok(()); } - let new_store = new_store.unwrap(); + let new_store = new_store?; let l = ui.find_name::>("stores").unwrap(); @@ -2040,7 +2030,7 @@ fn main() -> Result<()> { 2 => { if args[1] == "-h" || args[1] == "--help" { help(); - std::process::exit(0); + process::exit(0); } else { eprintln!( "{}", @@ -2092,7 +2082,7 @@ fn main() -> Result<()> { eprintln!("Error {err}"); process::exit(1); } - let (config, config_file_location) = config_res.unwrap(); + let (config, config_file_location) = config_res?; for path in validate_stores_config(&config, &home) { wizard::show_init_menu(&Some(path), &home); @@ -2105,8 +2095,7 @@ fn main() -> Result<()> { } let stores: StoreListType = Arc::new(Mutex::new( - stores - .unwrap() + stores? .into_iter() .map(|s| Arc::new(Mutex::new(s))) .collect(), @@ -2175,8 +2164,8 @@ fn main() -> Result<()> { // Movement ui.add_global_callback(Event::CtrlChar('n'), down); ui.add_global_callback(Event::CtrlChar('p'), up); - ui.add_global_callback(Event::Key(cursive::event::Key::PageDown), page_down); - ui.add_global_callback(Event::Key(cursive::event::Key::PageUp), page_up); + ui.add_global_callback(Event::Key(Key::PageDown), page_down); + ui.add_global_callback(Event::Key(Key::PageUp), page_up); // View list of persons that have access ui.add_global_callback(Event::CtrlChar('v'), { @@ -2224,14 +2213,14 @@ fn main() -> Result<()> { do_git_push(ui, store.clone()); } }); - ui.add_global_callback(Event::Key(cursive::event::Key::Ins), { + ui.add_global_callback(Event::Key(Key::Ins), { let store = store.clone(); move |ui: &mut Cursive| { create(ui, store.clone()); } }); - ui.add_global_callback(Event::Key(cursive::event::Key::Esc), |s| s.quit()); + ui.add_global_callback(Event::Key(Key::Esc), |s| s.quit()); if let Err(err) = ui.load_toml(&get_style(&store.lock()?.lock()?.get_style_file())) { eprintln!("Error {err:?}"); @@ -2240,7 +2229,7 @@ fn main() -> Result<()> { let search_box = EditView::new() .on_edit({ let store = store.clone(); - move |ui: &mut cursive::Cursive, query, _| { + move |ui: &mut Cursive, query, _| { do_search(&store, ui, query); } }) diff --git a/cursive/src/tests/helpers.rs b/cursive/src/tests/helpers.rs index 01d4519e..568d18c6 100644 --- a/cursive/src/tests/helpers.rs +++ b/cursive/src/tests/helpers.rs @@ -29,7 +29,7 @@ fn is_checkbox_checked_false() { let mut siv = cursive::default(); siv.add_layer(Checkbox::new().with_name("unit_test")); - assert_eq!(false, is_checkbox_checked(&mut siv, "unit_test")); + assert!(!is_checkbox_checked(&mut siv, "unit_test")); } #[test] @@ -39,7 +39,7 @@ fn is_checkbox_checked_true() { c_b.set_checked(true); siv.add_layer(c_b.with_name("unit_test")); - assert_eq!(true, is_checkbox_checked(&mut siv, "unit_test")); + assert!(is_checkbox_checked(&mut siv, "unit_test")); } #[test] @@ -56,7 +56,7 @@ fn is_radio_button_selected_false() { siv.add_layer(ll); - assert_eq!(false, is_radio_button_selected(&mut siv, "button1_name")); + assert!(!is_radio_button_selected(&mut siv, "button1_name")); } #[test] @@ -79,5 +79,5 @@ fn is_radio_button_selected_true() { e.select(); }); - assert_eq!(true, is_radio_button_selected(&mut siv, "button2_name")); + assert!(is_radio_button_selected(&mut siv, "button2_name")); } diff --git a/cursive/src/tests/main.rs b/cursive/src/tests/main.rs index 787d54bf..907158e3 100644 --- a/cursive/src/tests/main.rs +++ b/cursive/src/tests/main.rs @@ -22,9 +22,9 @@ fn do_delete_normal() { let mut siv = cursive::default(); let td = tempdir().unwrap(); - std::fs::create_dir(&td.path().join(".password-store")).unwrap(); + std::fs::create_dir(td.path().join(".password-store")).unwrap(); std::fs::write( - &td.path().join(".password-store").join("file.gpg"), + td.path().join(".password-store").join("file.gpg"), "pgp-data", ) .unwrap(); diff --git a/gtk/Cargo.toml b/gtk/Cargo.toml index ee834db2..df601457 100644 --- a/gtk/Cargo.toml +++ b/gtk/Cargo.toml @@ -7,13 +7,13 @@ edition = "2021" [dependencies] ripasso = { path = "../", version = "0.7.0-alpha" } -gtk = { version = "0.8.1", package = "gtk4", features = ["v4_6"] } -adw = { version = "0.6.0", package = "libadwaita" } -glib = "0.19.2" +gtk = { version = "0.9.5", package = "gtk4", features = ["v4_6"] } +adw = { version = "0.7.1", package = "libadwaita" } +glib = "0.20.7" once_cell = "1.19.0" hex = "0.4.3" -config = "0.11.0" +config = "0.15.4" chrono = { version = "0.4", default-features = false, features = ["clock"] } [build-dependencies] -glib-build-tools = "0.19" +glib-build-tools = "0.20.0" diff --git a/gtk/src/password_object/mod.rs b/gtk/src/password_object/mod.rs index 3399d6fd..6b420730 100644 --- a/gtk/src/password_object/mod.rs +++ b/gtk/src/password_object/mod.rs @@ -58,10 +58,7 @@ impl PasswordObject { }, }; - let commit_name = match p_e.committed_by { - Some(n) => n, - None => "".into(), - }; + let commit_name = p_e.committed_by.unwrap_or_else(|| "".into()); Self::new(p_e.name, p_e.path, file_date, commit_name, store) } diff --git a/gtk/src/window/mod.rs b/gtk/src/window/mod.rs index 0981e40d..c015f0e2 100644 --- a/gtk/src/window/mod.rs +++ b/gtk/src/window/mod.rs @@ -60,16 +60,23 @@ impl Window { } fn filter(&self) -> CustomFilter { - CustomFilter::new(clone!(@weak self as window => @default-panic, move |obj| { - let text = window.imp().entry.text(); - - // Get `PasswordObject` from `glib::Object` - let password_object = obj - .downcast_ref::() - .expect("The object needs to be of type `PasswordObject`."); + CustomFilter::new(clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |obj| { + let text = window.imp().entry.text(); + + // Get `PasswordObject` from `glib::Object` + let password_object = obj + .downcast_ref::() + .expect("The object needs to be of type `PasswordObject`."); - password_object.property::("name").contains(&text.to_string()) - })) + password_object + .property::("name") + .contains(&text.to_string()) + } + )) } fn setup_collections(&self) { @@ -81,13 +88,18 @@ impl Window { self.imp().collections_list.bind_model( Some(&collections), - clone!(@weak self as window => @default-panic, move |obj| { - let collection_object = obj - .downcast_ref() - .expect("The object should be of type `CollectionObject`."); - let row = window.create_collection_row(collection_object); - row.upcast() - }), + clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |obj| { + let collection_object = obj + .downcast_ref() + .expect("The object should be of type `CollectionObject`."); + let row = window.create_collection_row(collection_object); + row.upcast() + } + ), ) } @@ -119,7 +131,7 @@ impl Window { collection_object .bind_property("title", &label, "label") - .flags(glib::BindingFlags::SYNC_CREATE) + .flags(BindingFlags::SYNC_CREATE) .build(); ListBoxRow::builder().child(&label).build() @@ -132,13 +144,18 @@ impl Window { let selection_model = NoSelection::new(Some(filter_model.clone())); self.imp().passwords_list.bind_model( Some(&selection_model), - clone!(@weak self as window => @default-panic, move |obj| { - let password_object = obj - .downcast_ref() - .expect("The object should be of type `PasswordObject`."); - let row = window.create_password_row(password_object); - row.upcast() - }), + clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |obj| { + let password_object = obj + .downcast_ref() + .expect("The object should be of type `PasswordObject`."); + let row = window.create_password_row(password_object); + row.upcast() + } + ), ); // Store filter model @@ -151,11 +168,14 @@ impl Window { // Assure that the task list is only visible when it is supposed to self.set_task_list_visible(&passwords); - let passwords_changed_handler_id = passwords.connect_items_changed( - clone!(@weak self as window => move |passwords, _, _, _| { + let passwords_changed_handler_id = passwords.connect_items_changed(clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |passwords, _, _, _| { window.set_task_list_visible(passwords); - }), - ); + } + )); self.imp() .passwords_changed_handler_id .replace(Some(passwords_changed_handler_id)); @@ -231,40 +251,54 @@ impl Window { } fn setup_callbacks(&self) { - self.imp() - .entry - .connect_changed(clone!(@weak self as window => move |_| { + self.imp().entry.connect_changed(clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |_| { window.set_filter(); - })); + } + )); // Setup callback when items of collections change self.set_stack(); - self.collections().connect_items_changed( - clone!(@weak self as window => move |_, _, _, _| { + self.collections().connect_items_changed(clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |_, _, _, _| { window.set_stack(); - }), - ); + } + )); // Setup callback for activating a row of collections list - self.imp().collections_list.connect_row_activated( - clone!(@weak self as window => move |_, row| { + self.imp().collections_list.connect_row_activated(clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |_, row| { let index = row.index(); - let selected_collection = window.collections() + let selected_collection = window + .collections() .item(index as u32) .expect("There needs to be an object at this position.") .downcast::() .expect("The object needs to be a `CollectionObject`."); window.set_current_collection(selected_collection); window.imp().leaflet.navigate(NavigationDirection::Forward); - }), - ); + } + )); // Setup callback for activating a row in the password list - self.imp().passwords_list.connect_row_activated( - clone!(@weak self as window => move |_, row| { + self.imp().passwords_list.connect_row_activated(clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |_, row| { let index = row.index(); - let password = window.current_collection() + let password = window + .current_collection() .passwords() .item(index as u32) .expect("There needs to be an object at this position.") @@ -274,13 +308,15 @@ impl Window { let display = gtk::gdk::Display::default().unwrap(); let clipboard = display.clipboard(); clipboard.set_text(&password.property::("secret")); - }), - ); + } + )); // Setup callback for folding the leaflet - self.imp() - .leaflet - .connect_folded_notify(clone!(@weak self as window => move |leaflet| { + self.imp().leaflet.connect_folded_notify(clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |leaflet| { if leaflet.is_folded() { window .imp() @@ -293,13 +329,17 @@ impl Window { .set_selection_mode(SelectionMode::Single); window.select_collection_row(); } - })); + } + )); - self.imp() - .back_button - .connect_clicked(clone!(@weak self as window => move |_| { + self.imp().back_button.connect_clicked(clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |_| { window.imp().leaflet.navigate(NavigationDirection::Back); - })); + } + )); } fn set_stack(&self) { @@ -313,37 +353,62 @@ impl Window { fn setup_actions(&self) { // Create action to do a git pull for the current repository let action_git_pull = gio::SimpleAction::new("git-pull", None); - action_git_pull.connect_activate(clone!(@weak self as window => move |_, _| { - window.current_collection().git_pull(&window); - })); + action_git_pull.connect_activate(clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |_, _| { + window.current_collection().git_pull(&window); + } + )); self.add_action(&action_git_pull); // Create action to do a git push for the current repository let action_git_push = gio::SimpleAction::new("git-push", None); - action_git_push.connect_activate(clone!(@weak self as window => move |_, _| { - window.current_collection().git_push(&window); - })); + action_git_push.connect_activate(clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |_, _| { + window.current_collection().git_push(&window); + } + )); self.add_action(&action_git_push); // Create action to download pgp certificates for the current repository let action_pgp_download = gio::SimpleAction::new("pgp-download", None); - action_pgp_download.connect_activate(clone!(@weak self as window => move |_, _| { - window.current_collection().pgp_download(&window); - })); + action_pgp_download.connect_activate(clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |_, _| { + window.current_collection().pgp_download(&window); + } + )); self.add_action(&action_pgp_download); // Create action to download pgp certificates for the current repository let action_about = gio::SimpleAction::new("about", None); - action_about.connect_activate(clone!(@weak self as window => move |_, _| { - window.about_dialog(); - })); + action_about.connect_activate(clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |_, _| { + window.about_dialog(); + } + )); self.add_action(&action_about); // Create action to create new collection and add to action group "win" let action_new_list = gio::SimpleAction::new("new-collection", None); - action_new_list.connect_activate(clone!(@weak self as window => move |_, _| { - window.new_collection(); - })); + action_new_list.connect_activate(clone!( + #[weak(rename_to = window)] + self, + #[upgrade_or_panic] + move |_, _| { + window.new_collection(); + } + )); self.add_action(&action_new_list); } @@ -392,26 +457,40 @@ impl Window { .build(); dialog.content_area().append(&entry); - // Set entry's css class to "error", when there is not text in it - entry.connect_changed(clone!(@weak dialog => move |entry| { - let text = entry.text(); - let dialog_button = dialog. - widget_for_response(ResponseType::Accept). - expect("The dialog needs to have a widget for response type `Accept`."); - let empty = text.is_empty(); - - dialog_button.set_sensitive(!empty); - - if empty { - entry.add_css_class("error"); - } else { - entry.remove_css_class("error"); + // Set entry's css class to "error", when there is no text in it + entry.connect_changed(clone!( + #[weak(rename_to = _window)] + self, + #[weak] + dialog, + #[upgrade_or_panic] + move |entry| { + let text = entry.text(); + let dialog_button = dialog + .widget_for_response(ResponseType::Accept) + .expect("The dialog needs to have a widget for response type `Accept`."); + let empty = text.is_empty(); + + dialog_button.set_sensitive(!empty); + + if empty { + entry.add_css_class("error"); + } else { + entry.remove_css_class("error"); + } } - })); + )); // Connect response to dialog - dialog.connect_response( - clone!(@weak self as window, @weak entry => move |dialog, response| { + dialog.connect_response(clone!( + #[weak(rename_to = window)] + self, + #[weak] + entry, + #[weak] + dialog, + #[upgrade_or_panic] + move |_, response| { // Destroy dialog dialog.destroy(); @@ -425,7 +504,23 @@ impl Window { // Create a new collection object from the title the user provided let title = entry.text().to_string(); - let collection = CollectionObject::new(&title, passwords, Arc::new(Mutex::new(PasswordStore::new("default", &None, &None, &None, &None, &CryptoImpl::GpgMe, &None).expect("Created store"))), &window.imp().user_config_dir.borrow()); + let collection = CollectionObject::new( + &title, + passwords, + Arc::new(Mutex::new( + PasswordStore::new( + "default", + &None, + &None, + &None, + &None, + &CryptoImpl::GpgMe, + &None, + ) + .expect("Created store"), + )), + &window.imp().user_config_dir.borrow(), + ); // Add new collection object and set current passwords window.collections().append(&collection); @@ -433,8 +528,8 @@ impl Window { // Let the leaflet navigate to the next child window.imp().leaflet.navigate(NavigationDirection::Forward); - }), - ); + } + )); dialog.present(); } } @@ -449,21 +544,17 @@ fn get_stores( let stores: HashMap = stores; for store_name in stores.keys() { - let store: HashMap = stores - .get(store_name) - .unwrap() - .clone() - .into_table() - .unwrap(); + let store: HashMap = + stores.get(store_name).unwrap().clone().into_table()?; let password_store_dir_opt = store.get("path"); let valid_signing_keys_opt = store.get("valid_signing_keys"); if let Some(store_dir) = password_store_dir_opt { - let password_store_dir = Some(PathBuf::from(store_dir.clone().into_str()?)); + let password_store_dir = Some(PathBuf::from(store_dir.clone().into_string()?)); let valid_signing_keys = match valid_signing_keys_opt { - Some(k) => match k.clone().into_str() { + Some(k) => match k.clone().into_string() { Err(_) => None, Ok(key) => { if key == "-1" { @@ -476,7 +567,7 @@ fn get_stores( None => None, }; let style_path_opt = match store.get("style_path") { - Some(path) => match path.clone().into_str() { + Some(path) => match path.clone().into_string() { Ok(p) => Some(PathBuf::from(p)), Err(_err) => None, }, @@ -484,14 +575,14 @@ fn get_stores( }; let pgp_impl = match store.get("pgp") { - Some(pgp_str) => CryptoImpl::try_from(pgp_str.clone().into_str()?.as_str()), + Some(pgp_str) => CryptoImpl::try_from(pgp_str.clone().into_string()?.as_str()), None => Ok(CryptoImpl::GpgMe), }?; let own_fingerprint = store.get("own_fingerprint"); let own_fingerprint = match own_fingerprint { None => None, - Some(k) => match k.clone().into_str() { + Some(k) => match k.clone().into_string() { Err(_) => None, Ok(key) => match <[u8; 20]>::from_hex(key) { Err(_) => None, diff --git a/src/crypto.rs b/src/crypto.rs index cb7c7ed1..45600f2b 100644 --- a/src/crypto.rs +++ b/src/crypto.rs @@ -45,7 +45,7 @@ pub enum CryptoImpl { Sequoia, } -impl std::convert::TryFrom<&str> for CryptoImpl { +impl TryFrom<&str> for CryptoImpl { type Error = Error; fn try_from(value: &str) -> Result { @@ -92,8 +92,8 @@ impl From for VerificationError { } } -impl From for VerificationError { - fn from(err: crate::error::Error) -> Self { +impl From for VerificationError { + fn from(err: Error) -> Self { InfrastructureError(format!("{err:?}")) } } @@ -181,7 +181,7 @@ pub trait Crypto { /// Verifies is a signature is valid /// # Errors - /// Will return `Err` if the verifican fails. + /// Will return `Err` if the verification fails. fn verify_sign( &self, data: &[u8], @@ -189,7 +189,7 @@ pub trait Crypto { valid_signing_keys: &[[u8; 20]], ) -> std::result::Result; - /// Returns true if a recipient is in the users keyring. + /// Returns true if a recipient is in the user's keyring. fn is_key_in_keyring(&self, recipient: &Recipient) -> Result; /// Pull keys from the keyserver for those recipients. @@ -199,18 +199,18 @@ pub trait Crypto { /// Import a key from text. /// # Errors - /// Will return `Err` if the text wasn't able to be imported as a key. + /// Will return `Err` if the import of `key` as a key failed. fn import_key(&mut self, key: &str, config_path: &Path) -> Result; /// Return a key corresponding to the given key id. /// # Errors /// Will return `Err` if `key_id` didn't correspond to a key. - fn get_key(&self, key_id: &str) -> Result>; + fn get_key(&self, key_id: &str) -> Result>; /// Returns a map from key fingerprints to OwnerTrustLevel's /// # Errors /// Will return `Err` on failure to obtain trust levels. - fn get_all_trust_items(&self) -> Result>; + fn get_all_trust_items(&self) -> Result>; /// Returns the type of this `CryptoImpl`, useful for serializing the store config fn implementation(&self) -> CryptoImpl; @@ -307,21 +307,21 @@ impl Crypto for GpgMe { valid_signing_keys: &[[u8; 20]], ) -> std::result::Result { let mut ctx = gpgme::Context::from_protocol(gpgme::Protocol::OpenPgp) - .map_err(|e| VerificationError::InfrastructureError(format!("{e:?}")))?; + .map_err(|e| InfrastructureError(format!("{e:?}")))?; let result = ctx .verify_detached(sig, data) - .map_err(|e| VerificationError::InfrastructureError(format!("{e:?}")))?; + .map_err(|e| InfrastructureError(format!("{e:?}")))?; let mut sig_sum = None; for (i, s) in result.signatures().enumerate() { let fpr = s .fingerprint() - .map_err(|e| VerificationError::InfrastructureError(format!("{e:?}")))?; + .map_err(|e| InfrastructureError(format!("{e:?}")))?; - let fpr = <[u8; 20]>::from_hex(fpr) - .map_err(|e| VerificationError::InfrastructureError(format!("{e:?}")))?; + let fpr = + <[u8; 20]>::from_hex(fpr).map_err(|e| InfrastructureError(format!("{e:?}")))?; if !valid_signing_keys.contains(&fpr) { return Err(VerificationError::SignatureFromWrongRecipient); @@ -384,7 +384,7 @@ impl Crypto for GpgMe { Ok(result_str) } - fn get_key(&self, key_id: &str) -> Result> { + fn get_key(&self, key_id: &str) -> Result> { let mut ctx = gpgme::Context::from_protocol(gpgme::Protocol::OpenPgp)?; Ok(Box::new(GpgMeKey { @@ -392,7 +392,7 @@ impl Crypto for GpgMe { })) } - fn get_all_trust_items(&self) -> Result> { + fn get_all_trust_items(&self) -> Result> { let mut ctx = gpgme::Context::from_protocol(gpgme::Protocol::OpenPgp)?; ctx.set_key_list_mode(gpgme::KeyListMode::SIGS)?; @@ -443,22 +443,19 @@ struct Helper<'a> { /// A sequoia policy to use in various operations policy: &'a dyn Policy, /// the users cert - secret: Option<&'a sequoia_openpgp::Cert>, + secret: Option<&'a Cert>, /// all certs - key_ring: &'a HashMap<[u8; 20], Arc>, + key_ring: &'a HashMap<[u8; 20], Arc>, /// This is all the certificates that are allowed to sign something - public_keys: Vec>, + public_keys: Vec>, /// context if talking to gpg_agent for example ctx: Option, /// to do verification or not do_signature_verification: bool, } -impl<'a> VerificationHelper for Helper<'a> { - fn get_certs( - &mut self, - handles: &[sequoia_openpgp::KeyHandle], - ) -> sequoia_openpgp::Result> { +impl VerificationHelper for Helper<'_> { + fn get_certs(&mut self, handles: &[KeyHandle]) -> sequoia_openpgp::Result> { let mut certs = vec![]; for handle in handles { @@ -491,9 +488,9 @@ impl<'a> VerificationHelper for Helper<'a> { } fn find( - key_ring: &HashMap<[u8; 20], Arc>, + key_ring: &HashMap<[u8; 20], Arc>, recipient: &sequoia_openpgp::KeyID, -) -> Result> { +) -> Result> { let bytes: &[u8; 8] = match recipient { sequoia_openpgp::KeyID::V4(bytes) => bytes, _ => return Err(Error::Generic("not an v4 keyid")), @@ -508,7 +505,7 @@ fn find( Err(Error::Generic("key not found in keyring")) } -impl<'a> DecryptionHelper for Helper<'a> { +impl DecryptionHelper for Helper<'_> { fn decrypt( &mut self, pkesks: &[sequoia_openpgp::packet::PKESK], @@ -534,7 +531,7 @@ impl<'a> DecryptionHelper for Helper<'a> { )?; if pkesk .decrypt(&mut pair, sym_algo) - .map_or(false, |(algo, session_key)| decrypt(algo, &session_key)) + .is_some_and(|(algo, session_key)| decrypt(algo, &session_key)) { selected_fingerprint = Some(cert.fingerprint()); break; @@ -574,7 +571,9 @@ impl<'a> DecryptionHelper for Helper<'a> { } } - Err(anyhow::anyhow!("no pkesks managed to descrypt ciphertext")) + Err(anyhow::anyhow!( + "no pkesks managed to decrypt the ciphertext" + )) } } @@ -593,7 +592,7 @@ pub fn slice_to_20_bytes(b: &[u8]) -> Result<[u8; 20]> { /// A pgp key produced with sequoia. pub struct SequoiaKey { /// The pgp key - cert: sequoia_openpgp::Cert, + cert: Cert, } impl Key for SequoiaKey { @@ -618,12 +617,12 @@ impl Key for SequoiaKey { } } -/// If the users configures to use sequoia as their pgp implementation. +/// If the user selects to use sequoia as their pgp implementation. pub struct Sequoia { /// key id of the user. user_key_id: [u8; 20], /// All certs in the keys directory - key_ring: HashMap<[u8; 20], Arc>, + key_ring: HashMap<[u8; 20], Arc>, /// The home directory of the user, for gnupg context user_home: std::path::PathBuf, } @@ -633,7 +632,7 @@ impl Sequoia { /// # Errors /// If there is any problems reading the keys directory pub fn new(config_path: &Path, own_fingerprint: [u8; 20], user_home: &Path) -> Result { - let mut key_ring: HashMap<[u8; 20], Arc> = HashMap::new(); + let mut key_ring: HashMap<[u8; 20], Arc> = HashMap::new(); let dir = config_path.join("share").join("ripasso").join("keys"); if dir.exists() { @@ -659,7 +658,7 @@ impl Sequoia { pub fn from_values( user_key_id: [u8; 20], - key_ring: HashMap<[u8; 20], Arc>, + key_ring: HashMap<[u8; 20], Arc>, user_home: &Path, ) -> Self { Self { @@ -671,8 +670,8 @@ impl Sequoia { /// Converts a list of recipients to their sequoia certs /// # Errors - /// errors if not all recipients have certs - fn convert_recipients(&self, input: &[Recipient]) -> Result>> { + /// The function errors if any recipient doesn't have a cert + fn convert_recipients(&self, input: &[Recipient]) -> Result>> { let mut result = vec![]; for recipient in input { @@ -687,7 +686,7 @@ impl Sequoia { } }, None => { - let kh: sequoia_openpgp::KeyHandle = recipient.key_id.parse()?; + let kh: KeyHandle = recipient.key_id.parse()?; for cert in self.key_ring.values() { if cert.key_handle().aliases(&kh) { @@ -701,9 +700,9 @@ impl Sequoia { Ok(result) } - /// Download keys from the internet and write them to the keys dir. + /// Download keys from the internet and write them to the keys-dir. /// # Errors - /// Errors on download problems + /// The function errors on download problems. fn pull_and_write(&mut self, key_id: &str, keys_dir: &Path) -> Result { let response = download_keys(key_id)?; @@ -712,7 +711,7 @@ impl Sequoia { /// Writes a key to the keys directory, imported from a string. /// # Errors - /// Errors if the string can't be parsed as a cert. + /// The function errors if the string can't be parsed as a cert. fn write_cert(&mut self, cert_str: &str, keys_dir: &Path) -> Result { let cert = Cert::from_bytes(cert_str.as_bytes())?; @@ -752,13 +751,12 @@ impl Crypto for Sequoia { }; // Now, create a decryptor with a helper using the given Certs. - let mut decryptor = DecryptorBuilder::from_bytes(ciphertext)? - .with_policy(&p, None, helper) - .unwrap(); + let mut decryptor = + DecryptorBuilder::from_bytes(ciphertext)?.with_policy(&p, None, helper)?; // Decrypt the data. - std::io::copy(&mut decryptor, &mut sink).unwrap(); - let result = std::str::from_utf8(&sink).unwrap().to_owned(); + std::io::copy(&mut decryptor, &mut sink)?; + let result = std::str::from_utf8(&sink)?.to_owned(); sink.zeroize(); Ok(result) } else { @@ -928,7 +926,7 @@ impl Crypto for Sequoia { fn pull_keys(&mut self, recipients: &[&Recipient], config_path: &Path) -> Result { let p = config_path.join("share").join("ripasso").join("keys"); - std::fs::create_dir_all(&p)?; + fs::create_dir_all(&p)?; let mut ret = String::new(); for recipient in recipients { @@ -947,7 +945,7 @@ impl Crypto for Sequoia { fn import_key(&mut self, key: &str, config_path: &Path) -> Result { let p = config_path.join("share").join("ripasso").join("keys"); - std::fs::create_dir_all(&p)?; + fs::create_dir_all(&p)?; self.write_cert(key, &p) } diff --git a/src/error.rs b/src/error.rs index 5f5a3fac..57f9d815 100644 --- a/src/error.rs +++ b/src/error.rs @@ -7,7 +7,7 @@ use hex::FromHexError; use crate::pass::PasswordStore; -/// A enum that contains the different types of errors that the library returns as part of Result's. +/// An enum that contains the different types of errors that the library returns as part of Result's. #[non_exhaustive] #[derive(Debug)] pub enum Error { @@ -97,8 +97,8 @@ impl From> for Error { } } -impl From> for Error { - fn from(err: std::boxed::Box) -> Self { +impl From> for Error { + fn from(err: Box) -> Self { Self::GenericDyn(err.to_string()) } } @@ -121,10 +121,8 @@ impl From<&str> for Error { } } -impl From>> for Error { - fn from( - _err: std::sync::PoisonError>, - ) -> Self { +impl From>> for Error { + fn from(_err: PoisonError>) -> Self { Self::Generic("thread error") } } @@ -141,18 +139,8 @@ impl From for Error { } } -impl - From< - std::sync::PoisonError< - std::sync::MutexGuard<'_, std::vec::Vec>, - >, - > for Error -{ - fn from( - _err: std::sync::PoisonError< - std::sync::MutexGuard<'_, std::vec::Vec>, - >, - ) -> Self { +impl From>>> for Error { + fn from(_err: PoisonError>>) -> Self { Self::Generic("thread error") } } diff --git a/src/git.rs b/src/git.rs index 2fa6657d..0c3d8c53 100644 --- a/src/git.rs +++ b/src/git.rs @@ -14,7 +14,7 @@ use crate::{ signature::SignatureStatus, }; -fn git_branch_name(repo: &git2::Repository) -> Result { +fn git_branch_name(repo: &Repository) -> Result { let head = repo.find_reference("HEAD")?; let symbolic = head .symbolic_target() @@ -32,13 +32,13 @@ fn git_branch_name(repo: &git2::Repository) -> Result { /// Apply the changes to the git repository. pub fn commit( - repo: &git2::Repository, + repo: &Repository, signature: &git2::Signature, message: &str, tree: &git2::Tree, parents: &[&git2::Commit], crypto: &(dyn Crypto + Send), -) -> Result { +) -> Result { if should_sign(repo) { let commit_buf = repo.commit_create_buffer( signature, // author @@ -75,23 +75,22 @@ pub fn commit( } } -pub fn find_last_commit(repo: &git2::Repository) -> Result { +pub fn find_last_commit(repo: &Repository) -> Result { let obj = repo.head()?.resolve()?.peel(git2::ObjectType::Commit)?; obj.into_commit() .map_err(|_| Error::Generic("Couldn't find commit")) } /// Returns if a git commit should be gpg signed or not. -fn should_sign(repo: &git2::Repository) -> bool { - repo.config().map_or(false, |config| { - config.get_bool("commit.gpgsign").unwrap_or(false) - }) +fn should_sign(repo: &Repository) -> bool { + repo.config() + .is_ok_and(|config| config.get_bool("commit.gpgsign").unwrap_or(false)) } -/// returns true if the diff between the two commit's contains the path that the `DiffOptions` +/// returns true if the diff between the two commits contains the path that the `DiffOptions` /// have been prepared with pub fn match_with_parent( - repo: &git2::Repository, + repo: &Repository, commit: &git2::Commit, parent: &git2::Commit, opts: &mut git2::DiffOptions, @@ -104,11 +103,11 @@ pub fn match_with_parent( /// Add a file to the store, and commit it to the supplied git repository. pub fn add_and_commit_internal( - repo: &git2::Repository, + repo: &Repository, paths: &[PathBuf], message: &str, crypto: &(dyn Crypto + Send), -) -> Result { +) -> Result { let mut index = repo.index()?; for path in paths { index.add_path(path)?; @@ -131,11 +130,7 @@ pub fn add_and_commit_internal( } /// Remove a file from the store, and commit the deletion to the supplied git repository. -pub fn remove_and_commit( - store: &PasswordStore, - paths: &[PathBuf], - message: &str, -) -> Result { +pub fn remove_and_commit(store: &PasswordStore, paths: &[PathBuf], message: &str) -> Result { let repo = store .repo() .map_err(|_| Error::Generic("must have a repository"))?; @@ -175,7 +170,7 @@ pub fn move_and_commit( old_name: &Path, new_name: &Path, message: &str, -) -> Result { +) -> Result { let repo = store .repo() .map_err(|_| Error::Generic("must have a repository"))?; @@ -210,7 +205,7 @@ pub fn move_and_commit( /// find the origin of the git repo, with the following strategy: /// find the branch that HEAD points to, and read the remote configured for that branch /// returns the remote and the name of the local branch -fn find_origin(repo: &git2::Repository) -> Result<(git2::Remote, String)> { +fn find_origin(repo: &Repository) -> Result<(git2::Remote, String)> { for branch in repo.branches(Some(git2::BranchType::Local))? { let b = branch?.0; if b.is_head() { @@ -253,7 +248,7 @@ fn cred( /// Push your changes to the remote git repository. /// # Errors -/// Returns an `Err` if the repository doesn't exist or if an git operation fails +/// Returns an `Err` if the repository doesn't exist or if a git operation fails pub fn push(store: &PasswordStore) -> Result<()> { let repo = store .repo() @@ -286,7 +281,7 @@ pub fn push(store: &PasswordStore) -> Result<()> { /// Pull new changes from the remote git repository. /// # Errors -/// Returns an `Err` if the repository doesn't exist or if an git operation fails +/// Returns an `Err` if the repository doesn't exist or if a git operation fails pub fn pull(store: &PasswordStore) -> Result<()> { let repo = store .repo() @@ -353,7 +348,7 @@ fn triple( pub fn read_git_meta_data( base: &Path, path: &Path, - repo: &git2::Repository, + repo: &Repository, store: &PasswordStore, ) -> ( Result>, @@ -423,17 +418,17 @@ pub fn verify_git_signature( /// Initialize a git repository for the store. /// # Errors /// Returns an `Err` if the git init fails -pub fn init_git_repo(base: &Path) -> Result { - Ok(git2::Repository::init(base)?) +pub fn init_git_repo(base: &Path) -> Result { + Ok(Repository::init(base)?) } pub fn push_password_if_match( target: &Path, found: &Path, commit: &git2::Commit, - repo: &git2::Repository, + repo: &Repository, passwords: &mut Vec, - oid: &git2::Oid, + oid: &Oid, store: &PasswordStore, ) -> bool { if *target == *found { diff --git a/src/pass.rs b/src/pass.rs index 25bbaa87..a5c76dcd 100644 --- a/src/pass.rs +++ b/src/pass.rs @@ -25,6 +25,7 @@ use std::{ }; use chrono::prelude::*; +use config::Config; use totp_rs::TOTP; use zeroize::Zeroize; @@ -52,7 +53,7 @@ pub struct PasswordStore { /// A list of fingerprints of keys that are allowed to sign the .gpg-id file, obtained from the environmental /// variable `PASSWORD_STORE_SIGNING_KEY` or from the configuration file valid_gpg_signing_keys: Vec<[u8; 20]>, - /// a list of password files with meta data + /// a list of password files with metadata pub passwords: Vec, /// A file that describes the style of the store style_file: Option, @@ -313,18 +314,18 @@ impl PasswordStore { /// Creates a new password file in the store. /// # Errors - /// Returns an `Err` if the path points to an file outside of the password store or the file already exists. + /// Returns an `Err` if the path points to a file outside the password store or the file already exists. pub fn new_password_file(&mut self, path_end: &str, content: &str) -> Result { let mut path = self.root.clone(); - let c_path = std::fs::canonicalize(path.as_path())?; + let c_path = fs::canonicalize(path.as_path())?; let path_iter = &mut path_end.split('/').peekable(); while let Some(p) = path_iter.next() { if path_iter.peek().is_some() { path.push(p); - let c_file_res = std::fs::canonicalize(path.as_path()); + let c_file_res = fs::canonicalize(path.as_path()); if let Ok(c_file) = c_file_res { if !c_file.starts_with(c_path.as_path()) { return Err(Error::Generic( @@ -333,7 +334,7 @@ impl PasswordStore { } } if !path.exists() { - std::fs::create_dir(&path)?; + fs::create_dir(&path)?; } } else { path.push(format!("{p}.gpg")); @@ -348,7 +349,7 @@ impl PasswordStore { Ok(pe) => Ok(pe), Err(err) => { // try to remove the file we created, as cleanup - let _ = std::fs::remove_file(path); + let _ = fs::remove_file(path); // but always return the original error Err(err) @@ -416,7 +417,7 @@ impl PasswordStore { Ok(()) } - /// checks if there is a user name configured in git + /// checks if there is a username configured in git pub fn has_configured_username(&self) -> bool { if self.repo().is_err() { return true; @@ -581,9 +582,9 @@ impl PasswordStore { } fn recipients_file_for_dir(&self, path: &Path) -> Result { - let mut new_dir = std::fs::canonicalize(self.root.join(path))?; + let mut new_dir = fs::canonicalize(self.root.join(path))?; - let root = std::fs::canonicalize(&self.root)?; + let root = fs::canonicalize(&self.root)?; if !new_dir.starts_with(&root) { return Err(Error::Generic("path traversal is not allowed")); @@ -635,22 +636,23 @@ impl PasswordStore { /// Removes a key from the .gpg-id file and re-encrypts all the passwords /// # Errors - /// Returns an `Err` if the gpg_id file should be verified and it can't be or if the recipient is the last one. + /// Returns an `Err` if the gpg_id file can't be verified when it should + /// or if the recipient is the last one. pub fn remove_recipient(&self, r: &Recipient, path: &Path) -> Result<()> { let gpg_id_file = &self.recipients_file_for_dir(path)?; - let gpg_id_file_content = std::fs::read_to_string(gpg_id_file)?; + let gpg_id_file_content = fs::read_to_string(gpg_id_file)?; let res = self.remove_recipient_inner(r, path); if res.is_err() { - std::fs::write(gpg_id_file, gpg_id_file_content)?; + fs::write(gpg_id_file, gpg_id_file_content)?; } res } /// Adds a key to the .gpg-id file in the path directory and re-encrypts all the passwords /// # Errors - /// Returns an `Err` if the gpg_id file should be verified and it can't be or there is some problem with + /// Returns an `Err` if the gpg_id file can't be verified when it should or there is some problem with /// the encryption. pub fn add_recipient(&mut self, r: &Recipient, path: &Path, config_path: &Path) -> Result<()> { if !self.crypto.is_key_in_keyring(r)? { @@ -666,14 +668,14 @@ impl PasswordStore { if !dir.exists() { return Err(Error::Generic("path doesn't exist")); } - let dir = std::fs::canonicalize(self.root.join(path))?; - let root = std::fs::canonicalize(&self.root)?; + let dir = fs::canonicalize(self.root.join(path))?; + let root = fs::canonicalize(&self.root)?; if !dir.starts_with(root) { return Err(Error::Generic("path traversal not allowed")); } if !dir.join(".gpg-id").exists() { - std::fs::File::create(dir.join(".gpg-id"))?; + File::create(dir.join(".gpg-id"))?; } Recipient::add_recipient_to_file( @@ -688,7 +690,7 @@ impl PasswordStore { /// Reencrypt all the entries in the store, for example when a new collaborator is added /// to the team. /// # Errors - /// Returns an `Err` if the gpg_id file should be verified and it can't be or there is some problem with + /// Returns an `Err` if the gpg_id file can't be verified when it should or there is some problem with /// the encryption. fn reencrypt_all_password_entries(&self) -> Result<()> { let mut names: Vec = Vec::new(); @@ -785,17 +787,17 @@ impl PasswordStore { let mut new_path_dir = new_path.clone(); new_path_dir.pop(); - fs::create_dir_all(&new_path_dir)?; + create_dir_all(&new_path_dir)?; - let mut file = std::fs::File::create(&new_path)?; - let mut secret = self.crypto.decrypt_string(&std::fs::read(&old_path)?)?; + let mut file = File::create(&new_path)?; + let mut secret = self.crypto.decrypt_string(&fs::read(&old_path)?)?; let new_recipients = Recipient::all_recipients( &self.recipients_file_for_dir(&new_path)?, self.crypto.as_ref(), )?; file.write_all(&self.crypto.encrypt_string(&secret, &new_recipients)?)?; secret.zeroize(); - std::fs::remove_file(&old_path)?; + fs::remove_file(&old_path)?; if self.repo().is_ok() { let old_file_name = append_extension(PathBuf::from(old_name), ".gpg"); @@ -829,7 +831,7 @@ impl PasswordStore { pre_comment: &[String], post_comment: Option, ) -> Result { - crate::signature::Recipient::from(key_id, pre_comment, post_comment, self.crypto.as_ref()) + Recipient::from(key_id, pre_comment, post_comment, self.crypto.as_ref()) } } @@ -890,7 +892,7 @@ impl GitLogLine { } } -/// The state of a password, with regards to git +/// The state of a password, in the context of git #[derive(Clone, Debug, PartialEq, Eq, Default)] #[non_exhaustive] pub enum RepositoryStatus { @@ -924,7 +926,7 @@ fn to_name(relpath: &Path) -> String { let mut s = relpath.to_string_lossy().to_string(); if relpath .extension() - .map_or(false, |ext| ext.eq_ignore_ascii_case("gpg")) + .is_some_and(|ext| ext.eq_ignore_ascii_case("gpg")) { s.truncate(s.len() - 4); s @@ -934,7 +936,7 @@ fn to_name(relpath: &Path) -> String { } impl PasswordEntry { - /// constructs a a `PasswordEntry` from the supplied parts + /// constructs a `PasswordEntry` from the supplied parts pub fn new( base: &Path, // Root of the password directory relpath: &Path, // Relative path to the password. @@ -1024,7 +1026,7 @@ impl PasswordEntry { Ok(password) } - /// decrypts and returns a TOTP code if the entry contains a otpauth:// url + /// decrypts and returns a TOTP code if the entry contains an otpauth:// url /// # Errors /// Returns an `Err` if the code generation fails pub fn mfa(&self, store: &PasswordStore) -> Result { @@ -1041,7 +1043,7 @@ impl PasswordEntry { } end_pos }; - // Use unchecked for sites like Discord, Github that still use 80 + // Use unchecked for sites like Discord, GitHub that still use 80 // bit secrets. https://github.com/constantoine/totp-rs/issues/46 let totp = TOTP::from_url_unchecked(&secret[start_pos..end_pos])?; secret.zeroize(); @@ -1092,7 +1094,7 @@ impl PasswordEntry { /// # Errors /// Returns an `Err` if the remove fails. pub fn delete_file(&self, store: &PasswordStore) -> Result<()> { - std::fs::remove_file(&self.path)?; + fs::remove_file(&self.path)?; if store.repo().is_err() { return Ok(()); @@ -1232,42 +1234,41 @@ pub fn password_dir_raw(password_store_dir: &Option, home: &Option, settings: &config::Config) -> bool { +fn home_exists(home: &Option, settings: &Config) -> bool { if home.is_none() { return false; } let home = home.as_ref().unwrap(); - let home_dir = home.join(".password-store"); - if home_dir.exists() { - if !home_dir.is_dir() { - return false; - } + let default_password_store_dir = home.join(".password-store"); + if !default_password_store_dir.exists() { + return false; + } + if !default_password_store_dir.is_dir() { + return false; + } - let stores_res = settings.get("stores"); - if let Ok(stores) = stores_res { - let stores: HashMap = stores; - - for store_name in stores.keys() { - let store: HashMap = - stores[store_name].clone().into_table().unwrap(); - - let password_store_dir_opt = store.get("path"); - if let Some(p) = password_store_dir_opt { - let p_path = PathBuf::from(p.clone().into_str().unwrap()); - let c1 = std::fs::canonicalize(home_dir.clone()); - let c2 = std::fs::canonicalize(p_path); - if c1.is_ok() && c2.is_ok() && c1.unwrap() == c2.unwrap() { - return false; - } + let stores_res = settings.get("stores"); + if let Ok(stores) = stores_res { + let stores: HashMap = stores; + + for store_name in stores.keys() { + let store: HashMap = + stores[store_name].clone().into_table().unwrap(); + + let password_store_dir_opt = store.get("path"); + if let Some(p) = password_store_dir_opt { + let p_path = PathBuf::from(p.clone().into_string().unwrap()); + let c1 = fs::canonicalize(default_password_store_dir.clone()); + let c2 = fs::canonicalize(p_path); + if c1.is_ok() && c2.is_ok() && c1.unwrap() == c2.unwrap() { + return false; } } } - - return true; } - false + true } fn env_var_exists(store_dir: &Option, signing_keys: &Option) -> bool { @@ -1287,15 +1288,14 @@ fn settings_file_exists(home: &Option, xdg_config_home: &Option) -> Result { - let mut default_store = std::collections::HashMap::new(); +fn home_settings(home: &Option) -> Result { + let mut default_store = HashMap::new(); let home = home.as_ref().ok_or("no home directory set")?; @@ -1304,20 +1304,17 @@ fn home_settings(home: &Option) -> Result { home.join(".password-store/").to_string_lossy().to_string(), ); - let mut stores_map = std::collections::HashMap::new(); + let mut stores_map = HashMap::new(); stores_map.insert("default".to_owned(), default_store); - let mut new_settings = config::Config::default(); - new_settings.set("stores", stores_map)?; + let mut new_settings = config::ConfigBuilder::default(); + new_settings = new_settings.set_default("stores", stores_map)?; - Ok(new_settings) + Ok(config::ConfigBuilder::::build(new_settings)?) } -fn var_settings( - store_dir: &Option, - signing_keys: &Option, -) -> Result { - let mut default_store = std::collections::HashMap::new(); +fn var_settings(store_dir: &Option, signing_keys: &Option) -> Result { + let mut default_store = HashMap::new(); if let Some(dir) = store_dir { if dir.ends_with('/') { @@ -1332,13 +1329,13 @@ fn var_settings( default_store.insert("valid_signing_keys".to_owned(), "-1".to_owned()); } - let mut stores_map = std::collections::HashMap::new(); + let mut stores_map = HashMap::new(); stores_map.insert("default".to_owned(), default_store); - let mut new_settings = config::Config::default(); - new_settings.set("stores", stores_map)?; + let mut new_settings = config::ConfigBuilder::default(); + new_settings = new_settings.set_default("stores", stores_map)?; - Ok(new_settings) + Ok(config::ConfigBuilder::::build(new_settings)?) } fn xdg_config_file_location( @@ -1357,7 +1354,9 @@ fn xdg_config_file_location( } } -fn file_settings(xdg_config_file: &Path) -> config::File { +fn file_settings( + xdg_config_file: &Path, +) -> config::File { config::File::from(xdg_config_file.to_path_buf()) } @@ -1373,30 +1372,33 @@ pub fn read_config( signing_keys: &Option, home: &Option, xdg_config_home: &Option, -) -> Result<(config::Config, PathBuf)> { - let mut settings = config::Config::default(); +) -> Result<(Config, PathBuf)> { + let mut settings = config::ConfigBuilder::default(); let config_file_location = xdg_config_file_location(home, xdg_config_home)?; if settings_file_exists(home, xdg_config_home) { - settings.merge(file_settings(&config_file_location))?; + settings = config::ConfigBuilder::::add_source( + settings, + file_settings(&config_file_location), + ) } - if home_exists(home, &settings) { - settings.merge(home_settings(home)?)?; + if home_exists(home, &settings.clone().build()?) { + settings = settings.add_source(home_settings(home)?); } if env_var_exists(store_dir, signing_keys) { - settings.merge(var_settings(store_dir, signing_keys)?)?; + settings = settings.add_source(var_settings(store_dir, signing_keys)?); } - Ok((settings, config_file_location)) + Ok((settings.build()?, config_file_location)) } pub fn save_config( stores: Arc>>>>, config_file_location: &Path, ) -> Result<()> { - let mut stores_map = std::collections::HashMap::new(); + let mut stores_map = HashMap::new(); let stores_borrowed = stores .lock() .map_err(|_e| Error::Generic("problem locking the mutex"))?; @@ -1405,7 +1407,7 @@ pub fn save_config( let store = store .lock() .map_err(|_e| Error::Generic("problem locking the mutex"))?; - let mut store_map = std::collections::HashMap::new(); + let mut store_map = HashMap::new(); store_map.insert( "path", store @@ -1440,10 +1442,10 @@ pub fn save_config( stores_map.insert(store.get_name().clone(), store_map); } - let mut settings = std::collections::HashMap::new(); + let mut settings = HashMap::new(); settings.insert("stores", stores_map); - let f = std::fs::File::create(config_file_location)?; + let f = File::create(config_file_location)?; let mut f = std::io::BufWriter::new(f); f.write_all(toml::ser::to_string_pretty(&settings)?.as_bytes())?; diff --git a/src/signature.rs b/src/signature.rs index f559f1e4..6ac70184 100644 --- a/src/signature.rs +++ b/src/signature.rs @@ -141,13 +141,13 @@ impl std::hash::Hash for IdComment { } } -impl std::cmp::PartialEq for IdComment { +impl PartialEq for IdComment { fn eq(&self, other: &Self) -> bool { self.id == other.id } } -impl std::cmp::Eq for IdComment {} +impl Eq for IdComment {} /// Describes a comment around a gpg id / fingerprint. See this commit for source: /// @@ -166,11 +166,11 @@ pub struct Comment { /// All secrets are encrypted with the key_id of the recipients. #[derive(Clone, Debug)] pub struct Recipient { - /// Human readable name of the person. + /// Human-readable name of the person. pub name: String, /// The comment field from the .gpg-id file, not including the leading '#' characters. pub comment: Comment, - /// Machine readable identity taken from the .gpg-id file, in the form of a gpg key id + /// Machine-readable identity taken from the .gpg-id file, in the form of a gpg key id /// (16 hex chars) or a fingerprint (40 hex chars). pub key_id: String, /// The fingerprint of the pgp key, as 20 bytes, @@ -342,7 +342,7 @@ impl Recipient { valid_gpg_signing_keys: &[[u8; 20]], crypto: &(dyn crate::crypto::Crypto + Send), ) -> Result<()> { - let mut file = std::fs::OpenOptions::new() + let mut file = fs::OpenOptions::new() .write(true) .create(true) .truncate(true) @@ -392,7 +392,7 @@ impl Recipient { sig.into() }; - let mut recipient_sig_file = std::fs::OpenOptions::new() + let mut recipient_sig_file = fs::OpenOptions::new() .write(true) .create(true) .truncate(true) @@ -428,7 +428,7 @@ impl Recipient { if recipients_file == store_root_path.join(".gpg_id") { Err(Error::Generic("Can't delete the last encryption key")) } else { - Ok(std::fs::remove_file(recipients_file)?) + Ok(fs::remove_file(recipients_file)?) } } else { Recipient::write_recipients_file( @@ -475,7 +475,7 @@ impl PartialEq for Recipient { return false; } - return self.fingerprint.as_ref().unwrap() == other.fingerprint.as_ref().unwrap(); + self.fingerprint.as_ref().unwrap() == other.fingerprint.as_ref().unwrap() } } diff --git a/src/tests/pass.rs b/src/tests/pass.rs index 7907dcb3..87fd119a 100644 --- a/src/tests/pass.rs +++ b/src/tests/pass.rs @@ -1,5 +1,4 @@ -use std::{env, fs::File, path::PathBuf}; - +use config::ConfigBuilder; use git2::Repository; use hex::FromHex; use sequoia_openpgp::{ @@ -9,6 +8,7 @@ use sequoia_openpgp::{ Serialize, }, }; +use std::{env, fs::File, path::PathBuf}; use tempfile::tempdir; use super::*; @@ -20,7 +20,7 @@ use crate::{ }, }; -impl std::cmp::PartialEq for Error { +impl PartialEq for Error { fn eq(&self, other: &Error) -> bool { format!("{:?}", self) == format!("{:?}", *other) } @@ -62,7 +62,7 @@ pub fn setup_store( #[test] fn get_password_dir_no_env() { - let dir = tempfile::tempdir().unwrap(); + let dir = tempdir().unwrap(); env::remove_var("PASSWORD_STORE_DIR"); let path = password_dir(&None, &Some(dir.into_path())); @@ -331,22 +331,22 @@ fn password_store_with_symlink() -> Result<()> { #[test] fn home_exists_missing_home_env() { - assert!(!home_exists(&None, &config::Config::default())); + assert!(!home_exists(&None, &Config::default())); } #[test] fn home_exists_home_dir_without_config_dir() { - let dir = tempfile::tempdir().unwrap(); - let result = home_exists(&Some(dir.into_path()), &config::Config::default()); + let dir = tempdir().unwrap(); + let result = home_exists(&Some(dir.into_path()), &Config::default()); assert!(!result); } #[test] fn home_exists_home_dir_with_file_instead_of_dir() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); + let dir = tempdir().unwrap(); File::create(dir.path().join(".password-store"))?; - let result = home_exists(&Some(dir.into_path()), &config::Config::default()); + let result = home_exists(&Some(dir.into_path()), &Config::default()); assert!(!result); @@ -355,9 +355,9 @@ fn home_exists_home_dir_with_file_instead_of_dir() -> Result<()> { #[test] fn home_exists_home_dir_with_config_dir() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir(dir.path().join(".password-store"))?; - let result = home_exists(&Some(dir.into_path()), &config::Config::default()); + let dir = tempdir().unwrap(); + fs::create_dir(dir.path().join(".password-store"))?; + let result = home_exists(&Some(dir.into_path()), &Config::default()); assert!(result); @@ -371,7 +371,7 @@ fn env_var_exists_test_none() { #[test] fn env_var_exists_test_without_dir() { - let dir = tempfile::tempdir().unwrap(); + let dir = tempdir().unwrap(); assert!(env_var_exists( &Some( @@ -387,7 +387,7 @@ fn env_var_exists_test_without_dir() { #[test] fn env_var_exists_test_with_dir() { - let dir = tempfile::tempdir().unwrap(); + let dir = tempdir().unwrap(); assert!(env_var_exists( &Some(dir.path().to_str().unwrap().to_owned()), @@ -405,14 +405,14 @@ fn home_settings_missing() { #[test] fn home_settings_dir_exists() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + fs::create_dir(dir.path().join(".password-store"))?; let settings = home_settings(&Some(PathBuf::from(dir.path()))).unwrap(); let stores = settings.get_table("stores")?; let work = stores["default"].clone().into_table()?; - let path = work["path"].clone().into_str()?; + let path = work["path"].clone().into_string()?; assert_eq!( dir.path() @@ -429,13 +429,13 @@ fn home_settings_dir_exists() -> Result<()> { /// this works due to that it's the function `home_exists` that checks if it exists #[test] fn home_settings_dir_doesnt_exists() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); + let dir = tempdir().unwrap(); let settings = home_settings(&Some(PathBuf::from(dir.path()))).unwrap(); let stores = settings.get_table("stores")?; let work = stores["default"].clone().into_table()?; - let path = work["path"].clone().into_str()?; + let path = work["path"].clone().into_string()?; assert_eq!( dir.path() @@ -458,8 +458,8 @@ fn var_settings_test() -> Result<()> { let stores = settings.get_table("stores")?; let work = stores["default"].clone().into_table()?; - let path = work["path"].clone().into_str()?; - let valid_signing_keys = work["valid_signing_keys"].clone().into_str()?; + let path = work["path"].clone().into_string()?; + let valid_signing_keys = work["valid_signing_keys"].clone().into_string()?; assert_eq!("/home/user/.password-store/", path); assert_eq!( @@ -472,8 +472,8 @@ fn var_settings_test() -> Result<()> { #[test] fn file_settings_simple_file() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".config").join("ripasso"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".config").join("ripasso"))?; let mut file = File::create( dir.path() .join(".config") @@ -487,15 +487,17 @@ fn file_settings_simple_file() -> Result<()> { )?; file.flush()?; - let mut settings: config::Config = config::Config::default(); - settings.merge(file_settings( - &xdg_config_file_location(&Some(dir.into_path()), &None).unwrap(), - ))?; + let mut settings = ConfigBuilder::default(); + settings = config::ConfigBuilder::::add_source( + settings, + file_settings(&xdg_config_file_location(&Some(dir.into_path()), &None).unwrap()), + ); + let settings = settings.build()?; let stores = settings.get_table("stores")?; let work = stores["work"].clone().into_table()?; - let path = work["path"].clone().into_str()?; + let path = work["path"].clone().into_string()?; assert_eq!("/home/user/.password-store", path); Ok(()) @@ -503,9 +505,9 @@ fn file_settings_simple_file() -> Result<()> { #[test] fn file_settings_file_in_xdg_config_home() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - let dir2 = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir2.path().join(".random_config").join("ripasso"))?; + let dir = tempdir().unwrap(); + let dir2 = tempdir().unwrap(); + create_dir_all(dir2.path().join(".random_config").join("ripasso"))?; let mut file = File::create( dir2.path() .join(".random_config") @@ -519,16 +521,20 @@ fn file_settings_file_in_xdg_config_home() -> Result<()> { )?; file.flush()?; - let mut settings: config::Config = config::Config::default(); - settings.merge(file_settings(&xdg_config_file_location( - &Some(dir.into_path()), - &Some(dir2.path().join(".random_config")), - )?))?; + let mut settings = ConfigBuilder::default(); + settings = config::ConfigBuilder::::add_source( + settings, + file_settings(&xdg_config_file_location( + &Some(dir.into_path()), + &Some(dir2.path().join(".random_config")), + )?), + ); + let settings = settings.build()?; let stores = settings.get_table("stores")?; let work = stores["work"].clone().into_table()?; - let path = work["path"].clone().into_str()?; + let path = work["path"].clone().into_string()?; assert_eq!("/home/user/.password-store", path); Ok(()) @@ -536,9 +542,9 @@ fn file_settings_file_in_xdg_config_home() -> Result<()> { #[test] fn read_config_empty_config_file() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".config").join("ripasso"))?; - std::fs::create_dir_all(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".config").join("ripasso"))?; + create_dir_all(dir.path().join(".password-store"))?; File::create( dir.path() .join(".config") @@ -550,7 +556,7 @@ fn read_config_empty_config_file() -> Result<()> { let stores = settings.get_table("stores")?; let work = stores["default"].clone().into_table()?; - let path = work["path"].clone().into_str()?; + let path = work["path"].clone().into_string()?; assert_eq!( dir.path() @@ -566,8 +572,8 @@ fn read_config_empty_config_file() -> Result<()> { #[test] fn read_config_empty_config_file_with_keys_env() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".password-store"))?; let (settings, _) = read_config( &None, @@ -578,8 +584,8 @@ fn read_config_empty_config_file_with_keys_env() -> Result<()> { let stores = settings.get_table("stores")?; let work = stores["default"].clone().into_table()?; - let path = work["path"].clone().into_str()?; - let valid_signing_keys = work["valid_signing_keys"].clone().into_str()?; + let path = work["path"].clone().into_string()?; + let valid_signing_keys = work["valid_signing_keys"].clone().into_string()?; assert_eq!( dir.path() @@ -599,8 +605,8 @@ fn read_config_empty_config_file_with_keys_env() -> Result<()> { #[test] fn read_config_env_vars() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join("env_var").join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join("env_var").join(".password-store"))?; let (settings, _) = read_config( &Some( @@ -618,8 +624,8 @@ fn read_config_env_vars() -> Result<()> { let stores = settings.get_table("stores")?; let work = stores["default"].clone().into_table()?; - let path = work["path"].clone().into_str()?; - let valid_signing_keys = work["valid_signing_keys"].clone().into_str()?; + let path = work["path"].clone().into_string()?; + let valid_signing_keys = work["valid_signing_keys"].clone().into_string()?; assert_eq!( dir.path() @@ -640,9 +646,9 @@ fn read_config_env_vars() -> Result<()> { #[test] fn read_config_home_and_env_vars() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".password-store"))?; - std::fs::create_dir_all(dir.path().join("env_var").join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".password-store"))?; + create_dir_all(dir.path().join("env_var").join(".password-store"))?; let (settings, _) = read_config( &Some( @@ -660,8 +666,8 @@ fn read_config_home_and_env_vars() -> Result<()> { let stores = settings.get_table("stores")?; let work = stores["default"].clone().into_table()?; - let path = work["path"].clone().into_str()?; - let valid_signing_keys = work["valid_signing_keys"].clone().into_str()?; + let path = work["path"].clone().into_string()?; + let valid_signing_keys = work["valid_signing_keys"].clone().into_string()?; assert_eq!( dir.path() @@ -682,13 +688,13 @@ fn read_config_home_and_env_vars() -> Result<()> { #[test] fn read_config_default_path_in_config_file() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".password-store"))?; let mut gpg_file = File::create(dir.path().join(".password-store").join(".gpg-id"))?; writeln!(&gpg_file, "0xDF0C3D316B7312D5\n")?; gpg_file.flush()?; - std::fs::create_dir_all(dir.path().join(".config").join("ripasso"))?; + create_dir_all(dir.path().join(".config").join("ripasso"))?; let mut file = File::create( dir.path() .join(".config") @@ -708,7 +714,7 @@ fn read_config_default_path_in_config_file() -> Result<()> { let stores = settings.get_table("stores")?; let work = stores["work"].clone().into_table()?; - let path = work["path"].clone().into_str()?; + let path = work["path"].clone().into_string()?; assert_eq!(dir.path().join(".password-store").to_str().unwrap(), path); assert!(!stores.contains_key("default")); @@ -717,13 +723,13 @@ fn read_config_default_path_in_config_file() -> Result<()> { #[test] fn read_config_default_path_in_env_var() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".password-store"))?; let mut gpg_file = File::create(dir.path().join(".password-store").join(".gpg-id"))?; writeln!(&gpg_file, "0xDF0C3D316B7312D5\n")?; gpg_file.flush()?; - std::fs::create_dir_all(dir.path().join(".config").join("ripasso"))?; + create_dir_all(dir.path().join(".config").join("ripasso"))?; let mut file = File::create( dir.path() .join(".config") @@ -748,8 +754,8 @@ fn read_config_default_path_in_env_var() -> Result<()> { let stores = settings.get_table("stores")?; let work = stores["default"].clone().into_table()?; - let path = work["path"].clone().into_str()?; - let keys = work["valid_signing_keys"].clone().into_str()?; + let path = work["path"].clone().into_string()?; + let keys = work["valid_signing_keys"].clone().into_string()?; assert_eq!("/tmp/t2/", path); assert_eq!("-1", keys); @@ -759,13 +765,13 @@ fn read_config_default_path_in_env_var() -> Result<()> { #[test] fn read_config_default_path_in_env_var_with_pgp_setting() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".password-store"))?; let mut gpg_file = File::create(dir.path().join(".password-store").join(".gpg-id"))?; writeln!(&gpg_file, "0xDF0C3D316B7312D5\n")?; gpg_file.flush()?; - std::fs::create_dir_all(dir.path().join(".config").join("ripasso"))?; + create_dir_all(dir.path().join(".config").join("ripasso"))?; let mut file = File::create( dir.path() .join(".config") @@ -790,14 +796,14 @@ fn read_config_default_path_in_env_var_with_pgp_setting() -> Result<()> { let stores = settings.get_table("stores")?; let work = stores["default"].clone().into_table()?; - let path = work["path"].clone().into_str()?; - let keys = work["valid_signing_keys"].clone().into_str()?; + let path = work["path"].clone().into_string()?; + let keys = work["valid_signing_keys"].clone().into_string()?; assert_eq!("/tmp/t2/", path); assert_eq!("-1", keys); - assert_eq!("gpg", work["pgp_implementation"].clone().into_str()?); + assert_eq!("gpg", work["pgp_implementation"].clone().into_string()?); assert_eq!( "7E068070D5EF794B00C8A9D91D108E6C07CBC406", - work["own_fingerprint"].clone().into_str()? + work["own_fingerprint"].clone().into_string()? ); assert!(!stores.contains_key("work")); @@ -808,8 +814,8 @@ fn read_config_default_path_in_env_var_with_pgp_setting() -> Result<()> { fn save_config_one_store() { let config_file = tempfile::NamedTempFile::new().unwrap(); let style_file = tempfile::NamedTempFile::new().unwrap(); - let passdir = tempfile::tempdir().unwrap(); - let home = tempfile::tempdir().unwrap(); + let passdir = tempdir().unwrap(); + let home = tempdir().unwrap(); let s1 = PasswordStore::new( "s1 name", @@ -828,7 +834,7 @@ fn save_config_one_store() { ) .unwrap(); - let config = std::fs::read_to_string(config_file.path()).unwrap(); + let config = fs::read_to_string(config_file.path()).unwrap(); assert!(config.contains("[stores.\"s1 name\"]\n")); assert!(config.contains(&format!("path = \"{}\"\n", passdir.path().display()))); @@ -842,7 +848,7 @@ fn save_config_one_store() { #[test] fn save_config_one_store_with_pgp_impl() { - let dir = tempfile::tempdir().unwrap(); + let dir = tempdir().unwrap(); let store = PasswordStore::new( "default", @@ -870,7 +876,7 @@ fn save_config_one_store_with_pgp_impl() { #[test] fn save_config_one_store_with_fingerprint() { - let dir = tempfile::tempdir().unwrap(); + let dir = tempdir().unwrap(); let store = PasswordStore::new( "default", @@ -985,7 +991,7 @@ fn rename_file_git_index_clean() -> Result<()> { store.reload_password_list()?; store.rename_file("1/test", "2/test")?; - let repo = git2::Repository::open(dir.dir())?; + let repo = Repository::open(dir.dir())?; assert!(repo.statuses(None)?.is_empty()); @@ -994,8 +1000,8 @@ fn rename_file_git_index_clean() -> Result<()> { #[test] fn decrypt_secret_empty_file() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".password-store"))?; let mut gpg_file = File::create(dir.path().join(".password-store").join(".gpg-id"))?; writeln!(&gpg_file, "0xDF0C3D316B7312D5\n")?; gpg_file.flush()?; @@ -1032,8 +1038,8 @@ fn decrypt_secret_empty_file() -> Result<()> { #[test] fn decrypt_secret_missing_file() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".password-store"))?; let mut gpg_file = File::create(dir.path().join(".password-store").join(".gpg-id"))?; writeln!(&gpg_file, "0xDF0C3D316B7312D5\n")?; gpg_file.flush()?; @@ -1070,8 +1076,8 @@ fn decrypt_secret_missing_file() -> Result<()> { #[test] fn decrypt_secret() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".password-store"))?; let mut gpg_file = File::create(dir.path().join(".password-store").join(".gpg-id"))?; writeln!(&gpg_file, "0xDF0C3D316B7312D5\n")?; gpg_file.flush()?; @@ -1111,8 +1117,8 @@ fn decrypt_secret() -> Result<()> { #[test] fn decrypt_password_empty_file() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".password-store"))?; let mut gpg_file = File::create(dir.path().join(".password-store").join(".gpg-id"))?; writeln!(&gpg_file, "0xDF0C3D316B7312D5\n")?; gpg_file.flush()?; @@ -1149,8 +1155,8 @@ fn decrypt_password_empty_file() -> Result<()> { #[test] fn decrypt_password_multiline() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".password-store"))?; let mut gpg_file = File::create(dir.path().join(".password-store").join(".gpg-id"))?; writeln!(&gpg_file, "0xDF0C3D316B7312D5\n")?; gpg_file.flush()?; @@ -1190,8 +1196,8 @@ fn decrypt_password_multiline() -> Result<()> { } fn mfa_setup(payload: String) -> Result<(tempfile::TempDir, PasswordEntry, PasswordStore)> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".password-store"))?; let mut gpg_file = File::create(dir.path().join(".password-store").join(".gpg-id"))?; writeln!(&gpg_file, "0xDF0C3D316B7312D5\n")?; gpg_file.flush()?; @@ -1273,8 +1279,8 @@ fn mfa_no_otpauth_url() -> Result<()> { #[test] fn update() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".password-store"))?; let mut gpg_file = File::create(dir.path().join(".password-store").join(".gpg-id"))?; writeln!(&gpg_file, "0xDF0C3D316B7312D5\n")?; gpg_file.flush()?; @@ -1319,8 +1325,8 @@ fn update() -> Result<()> { #[test] fn delete_file() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".password-store"))?; let mut gpg_file = File::create(dir.path().join(".password-store").join(".gpg-id"))?; writeln!(&gpg_file, "0xDF0C3D316B7312D5\n")?; gpg_file.flush()?; @@ -1358,8 +1364,8 @@ fn delete_file() -> Result<()> { #[test] fn get_history_no_repo() -> Result<()> { - let dir = tempfile::tempdir().unwrap(); - std::fs::create_dir_all(dir.path().join(".password-store"))?; + let dir = tempdir().unwrap(); + create_dir_all(dir.path().join(".password-store"))?; let mut gpg_file = File::create(dir.path().join(".password-store").join(".gpg-id"))?; writeln!(&gpg_file, "0xDF0C3D316B7312D5\n")?; gpg_file.flush()?; @@ -1447,7 +1453,7 @@ fn test_format_error() { #[allow(invalid_from_utf8)] let utf8_error = String::from_utf8(vec![255]).err().unwrap(); #[allow(invalid_from_utf8)] - let str_utf8_error = std::str::from_utf8(&[255]).err().unwrap(); + let str_utf8_error = str::from_utf8(&[255]).err().unwrap(); assert_eq!( format!("{}", Error::from(utf8_error.clone())), @@ -1623,7 +1629,7 @@ fn test_search() -> Result<()> { }; let store = PasswordStore { name: "store_name".to_owned(), - root: std::env::temp_dir(), + root: env::temp_dir(), valid_gpg_signing_keys: vec![], passwords: vec![p1, p2, p3], style_file: None, @@ -1645,7 +1651,7 @@ fn test_search() -> Result<()> { fn test_verify_git_signature() -> Result<()> { let dir = UnpackedDir::new("test_verify_git_signature")?; - let repo = git2::Repository::open(dir.dir()).unwrap(); + let repo = Repository::open(dir.dir()).unwrap(); let oid = repo.head()?.target().unwrap(); let store = PasswordStore { @@ -1719,7 +1725,7 @@ fn test_remove_and_commit() -> Result<()> { user_home: None, }; - let repo = git2::Repository::open(dir.dir()).unwrap(); + let repo = Repository::open(dir.dir()).unwrap(); let mut config = repo.config()?; config.set_bool("commit.gpgsign", true)?; @@ -1854,7 +1860,7 @@ fn sign(to_sign: &str, tsk: &sequoia_openpgp::Cert) -> String { // written. message.finalize().unwrap(); - std::str::from_utf8(&sink).unwrap().to_owned() + str::from_utf8(&sink).unwrap().to_owned() } #[test] @@ -1879,9 +1885,9 @@ fn test_verify_gpg_id_files_untrusted_key_in_keyring() { .join("share") .join("ripasso") .join("keys"); - std::fs::create_dir_all(&keys_dir).unwrap(); + create_dir_all(&keys_dir).unwrap(); let password_store_dir = td.path().join(".password_store"); - std::fs::create_dir_all(&password_store_dir).unwrap(); + create_dir_all(&password_store_dir).unwrap(); let mut file = File::create(keys_dir.join(hex::encode(store_owner.fingerprint().as_bytes()))).unwrap(); store_owner.serialize(&mut file).unwrap(); @@ -1971,7 +1977,7 @@ fn test_new_password_file_in_git_repo() -> Result<()> { "7E068070D5EF794B00C8A9D91D108E6C07CBC406", )?; - let repo = git2::Repository::init(td.path())?; + let repo = Repository::init(td.path())?; let mut config = repo.config()?; config.set_str("user.name", "default")?; config.set_str("user.email", "default@example.com")?; @@ -2011,7 +2017,7 @@ fn test_new_password_file_encryption_failure() -> Result<()> { "7E068070D5EF794B00C8A9D91D108E6C07CBC406", )?; - let repo = git2::Repository::init(td.path())?; + let repo = Repository::init(td.path())?; let mut config = repo.config()?; config.set_str("user.name", "default")?; config.set_str("user.email", "default@example.com")?; @@ -2048,7 +2054,7 @@ fn test_new_password_file_twice() -> Result<()> { "7E068070D5EF794B00C8A9D91D108E6C07CBC406", )?; - let repo = git2::Repository::init(td.path())?; + let repo = Repository::init(td.path())?; let mut config = repo.config()?; config.set_str("user.name", "default")?; config.set_str("user.email", "default@example.com")?; @@ -2326,13 +2332,13 @@ fn test_add_recipient_not_in_key_ring() -> Result<()> { assert_eq!(0, store.passwords.len()); store.new_password_file("file", "password")?; - let gpg_id_file_pre = std::fs::read_to_string(td.path().join(".gpg-id"))?; + let gpg_id_file_pre = fs::read_to_string(td.path().join(".gpg-id"))?; let res = store.add_recipient( &external_user_recipient, &PathBuf::from("./"), config_path.path(), ); - let gpg_id_file_post = std::fs::read_to_string(td.path().join(".gpg-id"))?; + let gpg_id_file_post = fs::read_to_string(td.path().join(".gpg-id"))?; assert!(res.is_err()); @@ -2362,9 +2368,9 @@ fn test_remove_last_recipient_with_decryption_rights() -> Result<()> { store.new_password_file("file", "password")?; store.add_recipient(&user3_recipient, &PathBuf::from("./"), config_path.path())?; - let gpg_id_file_pre = std::fs::read_to_string(td.path().join(".gpg-id"))?; + let gpg_id_file_pre = fs::read_to_string(td.path().join(".gpg-id"))?; let res = store.remove_recipient(&user0_recipient, &PathBuf::from("./")); - let gpg_id_file_post = std::fs::read_to_string(td.path().join(".gpg-id"))?; + let gpg_id_file_post = fs::read_to_string(td.path().join(".gpg-id"))?; assert!(res.is_ok()); @@ -2387,7 +2393,7 @@ fn test_remove_last_recipient_from_sub_folder() -> Result<()> { hex::encode(users[0].fingerprint().as_bytes()) + "\n", )?; - std::fs::create_dir(td.path().join("dir"))?; + fs::create_dir(td.path().join("dir"))?; fs::write( td.path().join("dir").join(".gpg-id"), @@ -2399,9 +2405,9 @@ fn test_remove_last_recipient_from_sub_folder() -> Result<()> { store.new_password_file("file", "password")?; store.new_password_file("dir/file", "password")?; - let gpg_id_file_pre = std::fs::read_to_string(td.path().join(".gpg-id"))?; + let gpg_id_file_pre = fs::read_to_string(td.path().join(".gpg-id"))?; let res = store.remove_recipient(&user0_recipient, &PathBuf::from("dir")); - let gpg_id_file_post = std::fs::read_to_string(td.path().join(".gpg-id"))?; + let gpg_id_file_post = fs::read_to_string(td.path().join(".gpg-id"))?; assert!(res.is_ok()); assert!(!td.path().join("dir").join(".gpg-id").exists()); @@ -2483,7 +2489,7 @@ fn test_recipients_file_for_dir() -> Result<()> { let (store, _) = setup_store(&td, user_home.path())?; - std::fs::File::create(td.path().join(".gpg-id"))?; + File::create(td.path().join(".gpg-id"))?; assert_eq!( td.path().join(".gpg-id"),