From b0f314837ea7bf340b16069ed1683ed466bb7a77 Mon Sep 17 00:00:00 2001 From: veeso Date: Sat, 15 Mar 2025 14:15:45 +0100 Subject: [PATCH] build(deps): updated dependencies and edition to 2024 --- CHANGELOG.md | 14 + Cargo.lock | 1816 ++++++++++------- Cargo.toml | 30 +- src/activity_manager.rs | 17 +- src/config/serialization.rs | 4 +- src/explorer/formatter.rs | 100 +- src/explorer/mod.rs | 4 +- src/filetransfer/params.rs | 12 +- src/host/bridge.rs | 2 +- src/host/localhost.rs | 98 +- src/system/auto_update.rs | 2 +- src/system/bookmarks_client.rs | 2 +- src/system/config_client.rs | 22 +- src/system/logging.rs | 2 +- src/system/sshkey_storage.rs | 12 +- src/system/theme_provider.rs | 2 +- src/system/watcher/mod.rs | 82 +- src/ui/activities/auth/bookmarks.rs | 2 +- src/ui/activities/auth/components/form.rs | 23 +- src/ui/activities/auth/misc.rs | 2 +- src/ui/activities/auth/mod.rs | 2 +- src/ui/activities/auth/update.rs | 860 ++++---- src/ui/activities/auth/view.rs | 918 +++++---- .../filetransfer/actions/change_dir.rs | 4 +- .../activities/filetransfer/actions/edit.rs | 13 +- .../activities/filetransfer/actions/filter.rs | 2 +- src/ui/activities/filetransfer/actions/mod.rs | 2 +- .../activities/filetransfer/components/mod.rs | 6 +- .../filetransfer/components/popups.rs | 2 +- src/ui/activities/filetransfer/misc.rs | 199 +- src/ui/activities/filetransfer/mod.rs | 2 +- src/ui/activities/filetransfer/session.rs | 2 +- src/ui/activities/filetransfer/update.rs | 2 +- src/ui/activities/filetransfer/view.rs | 826 ++++---- src/ui/activities/setup/actions.rs | 4 +- src/ui/activities/setup/config.rs | 4 +- src/ui/activities/setup/mod.rs | 2 +- src/ui/activities/setup/update.rs | 216 +- src/ui/activities/setup/view/mod.rs | 235 +-- src/ui/activities/setup/view/setup.rs | 227 ++- src/ui/activities/setup/view/ssh_keys.rs | 70 +- src/ui/activities/setup/view/theme.rs | 569 +++--- src/utils/random.rs | 7 +- src/utils/ssh.rs | 22 +- src/utils/test_helpers.rs | 4 +- src/utils/ui.rs | 8 +- 46 files changed, 3621 insertions(+), 2835 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b4ff73..bdfa561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog - [Changelog](#changelog) + - [0.17.0](#0170) - [0.16.1](#0161) - [0.16.0](#0160) - [0.15.0](#0150) @@ -39,6 +40,19 @@ --- +## 0.17.0 + +Released on ?? + +- Dependencies: + - `argh` to `0.1.13` + - `bytesize` to `2` + - `dirs` to `6` + - `magic-crypt` to `4` + - `notify` to `8` + - `ssh2-config` to `0.3` + - `remotefs-ssh` to `0.4` + ## 0.16.1 Released on 12/11/2024 diff --git a/Cargo.lock b/Cargo.lock index 72eea9d..ff8c3ae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -19,14 +19,13 @@ checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aes" -version = "0.7.5" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", "cpufeatures", - "opaque-debug", ] [[package]] @@ -40,9 +39,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "android-tzdata" @@ -61,34 +60,35 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" dependencies = [ "derive_arbitrary", ] [[package]] name = "argh" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7af5ba06967ff7214ce4c7419c7d185be7ecd6cc4965a8f6e1d8ce0398aad219" +checksum = "34ff18325c8a36b82f992e533ece1ec9f9a9db446bd1c14d4f936bac88fcd240" dependencies = [ "argh_derive", "argh_shared", + "rust-fuzzy-search", ] [[package]] name = "argh_derive" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56df0aeedf6b7a2fc67d06db35b09684c3e8da0c95f8f27685cb17e08413d87a" +checksum = "adb7b2b83a50d329d5d8ccc620f5c7064028828538bdf5646acd60dc1f767803" dependencies = [ "argh_shared", "proc-macro2", @@ -98,24 +98,30 @@ dependencies = [ [[package]] name = "argh_shared" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5693f39141bda5760ecc4111ab08da40565d1771038c4a0250f03457ec707531" +checksum = "a464143cc82dedcdc3928737445362466b7674b5db4e2eb8e869846d6d84f4f6" dependencies = [ "serde", ] [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "attohttpc" version = "0.26.1" @@ -149,7 +155,7 @@ dependencies = [ "quick-xml 0.30.0", "rust-ini", "serde", - "thiserror", + "thiserror 1.0.69", "time", "url", ] @@ -160,7 +166,7 @@ version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9aed3f9c7eac9be28662fdb3b0f4d1951e812f7c64fed4f0327ba702f459b3b" dependencies = [ - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -192,9 +198,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.6.0" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" [[package]] name = "bitflags" @@ -204,9 +210,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" [[package]] name = "block" @@ -214,16 +220,6 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "block-padding", - "generic-array", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -234,26 +230,19 @@ dependencies = [ ] [[package]] -name = "block-modes" -version = "0.8.1" +name = "block-padding" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb03d1bed155d89dce0f845b7899b18a9a163e148fd004e1c28421a783e2d8e" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" dependencies = [ - "block-padding", - "cipher", + "generic-array", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "byteorder" @@ -263,21 +252,21 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "bytesize" -version = "1.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" +checksum = "a3c8f83209414aacf0eeae3cf730b18d6981697fba62f200fcfb92b9f082acba" [[package]] name = "bytestring" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" +checksum = "e465647ae23b2823b0753f50decb2d5a86d2bb2cac04788fafd1f80e45378e5f" dependencies = [ "bytes", ] @@ -293,25 +282,25 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" dependencies = [ "serde", ] [[package]] name = "cargo_metadata" -version = "0.18.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" dependencies = [ "camino", "cargo-platform", "semver", "serde", "serde_json", - "thiserror", + "thiserror 2.0.12", ] [[package]] @@ -330,10 +319,19 @@ dependencies = [ ] [[package]] -name = "cc" -version = "1.1.30" +name = "cbc" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher", +] + +[[package]] +name = "cc" +version = "1.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" dependencies = [ "jobserver", "libc", @@ -354,9 +352,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" dependencies = [ "android-tzdata", "iana-time-zone", @@ -364,23 +362,24 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-link", ] [[package]] name = "cipher" -version = "0.3.0" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "generic-array", + "crypto-common", + "inout", ] [[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", @@ -392,15 +391,15 @@ dependencies = [ [[package]] name = "console" -version = "0.15.8" +version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" dependencies = [ "encode_unicode", - "lazy_static", "libc", - "unicode-width 0.1.14", - "windows-sys 0.52.0", + "once_cell", + "unicode-width 0.2.0", + "windows-sys 0.59.0", ] [[package]] @@ -424,7 +423,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom", + "getrandom 0.2.15", "once_cell", "tiny-keccak", ] @@ -466,9 +465,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] @@ -491,20 +490,11 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" -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", @@ -521,9 +511,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" @@ -531,11 +521,11 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", "crossterm_winapi", - "mio 1.0.2", - "parking_lot 0.12.3", - "rustix", + "mio", + "parking_lot", + "rustix 0.38.44", "signal-hook", "signal-hook-mio", "winapi", @@ -552,9 +542,9 @@ dependencies = [ [[package]] name = "crunchy" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" [[package]] name = "crypto-common" @@ -575,7 +565,7 @@ dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", - "digest 0.10.7", + "digest", "fiat-crypto", "rustc_version", "subtle", @@ -630,9 +620,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" [[package]] name = "dbus" @@ -655,7 +645,7 @@ dependencies = [ "futures-util", "num", "once_cell", - "rand", + "rand 0.8.5", ] [[package]] @@ -686,9 +676,9 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", @@ -728,13 +718,11 @@ dependencies = [ [[package]] name = "des" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac41dd49fb554432020d52c875fc290e110113f864c6b1b525cd62c7e7747a5d" +checksum = "ffdd80ce8ce993de27e9f063a444a4d53ce8e8db4c1f00cc03af5ad5a9867a1e" dependencies = [ - "byteorder", "cipher", - "opaque-debug", ] [[package]] @@ -743,22 +731,13 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "crypto-common", "subtle", ] @@ -769,7 +748,16 @@ version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "dirs-sys", + "dirs-sys 0.4.1", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys 0.5.0", ] [[package]] @@ -790,10 +778,22 @@ checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", "option-ext", - "redox_users", + "redox_users 0.4.6", "windows-sys 0.48.0", ] +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users 0.5.0", + "windows-sys 0.59.0", +] + [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -801,7 +801,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", - "redox_users", + "redox_users 0.4.6", "winapi", ] @@ -844,7 +844,7 @@ dependencies = [ "curve25519-dalek", "ed25519", "serde", - "sha2 0.10.8", + "sha2", "signature", "subtle", "zeroize", @@ -862,46 +862,46 @@ dependencies = [ [[package]] name = "either" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "encode_unicode" -version = "0.3.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[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", ] [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[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 = "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 = "fiat-crypto" @@ -923,9 +923,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.34" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" dependencies = [ "crc32fast", "miniz_oxide", @@ -939,9 +939,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" [[package]] name = "foreign-types" @@ -1026,9 +1026,9 @@ checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" -version = "2.3.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" dependencies = [ "fastrand", "futures-core", @@ -1095,8 +1095,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", ] [[package]] @@ -1107,11 +1121,11 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[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.9.0", "libc", "libgit2-sys", "log", @@ -1137,6 +1151,25 @@ dependencies = [ "tracing", ] +[[package]] +name = "h2" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.3.1", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "hashbrown" version = "0.13.2" @@ -1145,9 +1178,9 @@ checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" dependencies = [ "allocator-api2", "equivalent", @@ -1163,7 +1196,7 @@ dependencies = [ "base64 0.21.7", "bytes", "headers-core", - "http 1.1.0", + "http 1.3.1", "httpdate", "mime", "sha1", @@ -1175,7 +1208,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" dependencies = [ - "http 1.1.0", + "http 1.3.1", ] [[package]] @@ -1184,12 +1217,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "hex" version = "0.4.3" @@ -1202,16 +1229,16 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] name = "home" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1238,9 +1265,9 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", @@ -1265,27 +1292,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.1.0", + "http 1.3.1", ] [[package]] name = "http-body-util" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", - "futures-util", - "http 1.1.0", + "futures-core", + "http 1.3.1", "http-body 1.0.1", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.9.5" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "httpdate" @@ -1295,15 +1322,15 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "httparse", @@ -1319,14 +1346,15 @@ dependencies = [ [[package]] name = "hyper" -version = "1.4.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.1.0", + "h2 0.4.8", + "http 1.3.1", "http-body 1.0.1", "httparse", "itoa", @@ -1338,15 +1366,15 @@ dependencies = [ [[package]] name = "hyper-http-proxy" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d06dbdfbacf34d996c6fb540a71a684a7aae9056c71951163af8a8a4c07b9a4" +checksum = "7ad4b0a1e37510028bc4ba81d0e38d239c39671b0f0ce9e02dfa93a8133f7c08" dependencies = [ "bytes", "futures-util", "headers", - "http 1.1.0", - "hyper 1.4.1", + "http 1.3.1", + "hyper 1.6.0", "hyper-rustls", "hyper-util", "pin-project-lite", @@ -1358,31 +1386,31 @@ 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 1.1.0", - "hyper 1.4.1", + "http 1.3.1", + "hyper 1.6.0", "hyper-util", "log", - "rustls 0.23.14", - "rustls-native-certs 0.8.0", + "rustls 0.23.23", + "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", - "webpki-roots 0.26.6", + "webpki-roots 0.26.8", ] [[package]] name = "hyper-timeout" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.4.1", + "hyper 1.6.0", "hyper-util", "pin-project-lite", "tokio", @@ -1396,7 +1424,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.30", + "hyper 0.14.32", "native-tls", "tokio", "tokio-native-tls", @@ -1404,16 +1432,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.1.0", + "http 1.3.1", "http-body 1.0.1", - "hyper 1.4.1", + "hyper 1.6.0", "pin-project-lite", "socket2", "tokio", @@ -1444,6 +1472,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1452,44 +1598,61 @@ 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_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] name = "indexmap" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.2", ] [[package]] name = "indicatif" -version = "0.17.8" +version = "0.17.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" dependencies = [ "console", - "instant", "number_prefix", "portable-atomic", - "unicode-width 0.1.14", + "unicode-width 0.2.0", + "web-time", ] [[package]] -name = "inotify" -version = "0.9.6" +name = "indoc" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" +checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" + +[[package]] +name = "inotify" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.9.0", "inotify-sys", "libc", ] @@ -1504,29 +1667,33 @@ dependencies = [ ] [[package]] -name = "instability" -version = "0.3.2" +name = "inout" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b23a0c8dfe501baac4adf6ebbfa6eddf8f0c07f56b058cc1288017e32397846c" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ + "block-padding", + "generic-array", +] + +[[package]] +name = "instability" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf9fed6d91cfb734e7476a06bde8300a1b94e217e1b523b6f0cd1a01998c71d" +dependencies = [ + "darling", + "indoc", + "proc-macro2", "quote", "syn", ] -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - [[package]] name = "ipnet" -version = "2.10.1" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "is-docker" @@ -1558,9 +1725,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jobserver" @@ -1573,10 +1740,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1592,7 +1760,7 @@ dependencies = [ "pest_derive", "regex", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1610,13 +1778,15 @@ dependencies = [ [[package]] name = "keyring" -version = "3.4.0" +version = "3.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3d701d3de5b9c4b0d9d077f8c2c66f0388d75e96932ebbb7cdff8713d7f7c6" +checksum = "1961983669d57bdfe6c0f3ef8e4c229b5ef751afcc7d87e4271d2f71f6ccfa8b" dependencies = [ "byteorder", "dbus-secret-service", - "security-framework 3.0.0", + "log", + "security-framework 2.11.1", + "security-framework 3.2.0", "windows-sys 0.59.0", ] @@ -1663,10 +1833,10 @@ dependencies = [ "either", "futures", "home", - "http 1.1.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", + "hyper 1.6.0", "hyper-http-proxy", "hyper-rustls", "hyper-timeout", @@ -1675,18 +1845,18 @@ dependencies = [ "k8s-openapi", "kube-core", "pem", - "rand", - "rustls 0.23.14", + "rand 0.8.5", + "rustls 0.23.23", "rustls-pemfile 2.2.0", "secrecy", "serde", "serde_json", "serde_yaml", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-tungstenite", "tokio-util", - "tower", + "tower 0.4.13", "tower-http", "tracing", ] @@ -1699,18 +1869,18 @@ checksum = "40fb9bd8141cbc0fe6b0d9112d371679b4cb607b45c31dd68d92e40864a12975" dependencies = [ "chrono", "form_urlencoded", - "http 1.1.0", + "http 1.3.1", "k8s-openapi", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "lazy-regex" -version = "3.3.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d8e41c97e6bc7ecb552016274b99fbb5d035e8de288c582d9b933af6677bfda" +checksum = "60c7310b93682b36b98fa7ea4de998d3463ccbebd94d935d6b48ba5b6ffa7126" dependencies = [ "lazy-regex-proc_macros", "once_cell", @@ -1719,9 +1889,9 @@ dependencies = [ [[package]] name = "lazy-regex-proc_macros" -version = "3.3.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e1d8b05d672c53cb9c7b920bbba8783845ae4f0b076e02a3db1d02c81b4163" +checksum = "4ba01db5ef81e17eb10a5e0f2109d1b3a3e29bac3070fdbd7d156bf7dbd206a1" dependencies = [ "proc-macro2", "quote", @@ -1737,9 +1907,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" [[package]] name = "libdbus-sys" @@ -1752,9 +1922,9 @@ dependencies = [ [[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", @@ -1768,16 +1938,16 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", "libc", - "redox_syscall 0.5.7", + "redox_syscall", ] [[package]] name = "libssh2-sys" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" +checksum = "220e4f05ad4a218192533b300327f5150e809b54c4ec83b5a1d91833601811b9" dependencies = [ "cc", "libc", @@ -1789,9 +1959,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.20" +version = "1.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" +checksum = "8b70e7a7df205e92a1a4cd9aaae7898dac0aa555503cc0a649494d0d60e7651d" dependencies = [ "cc", "libc", @@ -1801,9 +1971,21 @@ dependencies = [ [[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 = "linux-raw-sys" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" + +[[package]] +name = "litemap" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" [[package]] name = "lock_api" @@ -1823,9 +2005,9 @@ checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" [[package]] name = "log" -version = "0.4.22" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" [[package]] name = "lru" @@ -1833,7 +2015,7 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.15.0", + "hashbrown 0.15.2", ] [[package]] @@ -1851,18 +2033,17 @@ dependencies = [ [[package]] name = "magic-crypt" -version = "3.1.13" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c42f95f9d296f2dcb50665f507ed5a68a171453142663ce44d77a4eb217b053" +checksum = "844b6169eeaae32ae8a61855964331a67f12d2afba9170303fbd3e3c2a861a52" dependencies = [ "aes", - "base64 0.21.7", - "block-modes", + "base64 0.22.1", + "cbc", "crc-any", "des", - "digest 0.9.0", "md-5", - "sha2 0.9.9", + "sha2", "tiger", ] @@ -1888,13 +2069,12 @@ dependencies = [ [[package]] name = "md-5" -version = "0.9.1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug", + "cfg-if", + "digest", ] [[package]] @@ -1917,43 +2097,30 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" dependencies = [ "adler2", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", "log", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "mio" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" -dependencies = [ - "hermit-abi", - "libc", - "log", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] [[package]] name = "native-tls" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" dependencies = [ "libc", "log", @@ -1974,35 +2141,42 @@ checksum = "995defdca0a589acfdd1bd2e8e3b896b4d4f7675a31fd14c32611440c7f608e6" [[package]] name = "notify" -version = "6.1.1" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" +checksum = "2fee8403b3d66ac7b26aee6e40a897d85dc5ce26f44da36b8b73e987cc52e943" dependencies = [ - "bitflags 2.6.0", - "crossbeam-channel", + "bitflags 2.9.0", "filetime", "fsevent-sys", "inotify", "kqueue", "libc", "log", - "mio 0.8.11", + "mio", + "notify-types", "walkdir", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "notify-rust" -version = "4.11.3" +version = "4.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5134a72dc570b178bff81b01e81ab14a6fcc015391ed4b3b14853090658cd3a3" +checksum = "7fa3b9f2364a09bd359aa0206702882e208437450866a374d5372d64aece4029" dependencies = [ "dbus", + "futures-lite", "log", "mac-notification-sys", "tauri-winrt-notification", ] +[[package]] +name = "notify-types" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" + [[package]] name = "ntapi" version = "0.4.1" @@ -2019,7 +2193,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5262af4c94921c2646c5ac6ff7900c2af9cbb08dc26a797e18130a7019c039d4" dependencies = [ "nucleo-matcher", - "parking_lot 0.12.3", + "parking_lot", "rayon", ] @@ -2158,30 +2332,24 @@ dependencies = [ [[package]] name = "object" -version = "0.36.5" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.20.2" +version = "1.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" - -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" [[package]] name = "open" -version = "5.3.0" +version = "5.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" +checksum = "e2483562e62ea94312f3576a7aca397306df7990b8d89033e18766744377ef95" dependencies = [ "is-wsl", "libc", @@ -2190,11 +2358,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", "cfg-if", "foreign-types", "libc", @@ -2216,24 +2384,24 @@ dependencies = [ [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-src" -version = "300.3.2+3.3.2" +version = "300.4.2+3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" +checksum = "168ce4e058f975fe43e89d9ccf78ca668601887ae736090aacc23ae353c298e2" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" dependencies = [ "cc", "libc", @@ -2273,17 +2441,6 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.3" @@ -2291,21 +2448,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core 0.9.10", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -2316,7 +2459,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.7", + "redox_syscall", "smallvec", "windows-targets 0.52.6", ] @@ -2341,29 +2484,29 @@ checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" [[package]] name = "pathdiff" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "pavao" -version = "0.2.7" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bc0f9e07a0ef53a1004f67e01bc2fbf877ea9835dce2947e27fc7ac77b44db" +checksum = "8677bec6eb74833954ae5b63c3a6d58ea5447327cc8842a7c023b7d48d18af0c" dependencies = [ "cfg_aliases", "lazy_static", "libc", "log", "pkg-config", - "thiserror", + "thiserror 2.0.12", ] [[package]] name = "pem" -version = "3.0.4" +version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +checksum = "38af38e8470ac9dee3ce1bae1af9c1671fffc44ddfd8bd1d0a3445bf349a8ef3" dependencies = [ "base64 0.22.1", "serde", @@ -2377,20 +2520,20 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.13" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" +checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror", + "thiserror 2.0.12", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.13" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3a6e3394ec80feb3b6393c725571754c6188490265c61aaf260810d6b95aa0" +checksum = "816518421cfc6887a0d62bf441b6ffb4536fcc926395a69e1a85852d4363f57e" dependencies = [ "pest", "pest_generator", @@ -2398,9 +2541,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.13" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94429506bde1ca69d1b5601962c73f4172ab4726571a59ea95931218cb0e930e" +checksum = "7d1396fd3a870fc7838768d171b4616d5c91f6cc25e377b673d714567d99377b" dependencies = [ "pest", "pest_meta", @@ -2411,29 +2554,29 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.7.13" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac8a071862e93690b6e34e9a5fb8e33ff3734473ac0245b27232222c4906a33f" +checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea" dependencies = [ "once_cell", "pest", - "sha2 0.10.8", + "sha2", ] [[package]] name = "pin-project" -version = "1.1.6" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.6" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", @@ -2442,9 +2585,9 @@ dependencies = [ [[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" @@ -2464,15 +2607,15 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "portable-atomic" -version = "1.9.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" [[package]] name = "powerfmt" @@ -2482,9 +2625,9 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ "zerocopy", ] @@ -2501,22 +2644,13 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.87" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" dependencies = [ "unicode-ident", ] -[[package]] -name = "quick-xml" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bafc859c6815fbaffbbbf4229ecb767ac913fecb27f9ad4343662e9ef099ea" -dependencies = [ - "memchr", -] - [[package]] name = "quick-xml" version = "0.30.0" @@ -2537,46 +2671,59 @@ dependencies = [ ] [[package]] -name = "quinn" -version = "0.11.5" +name = "quick-xml" +version = "0.37.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +checksum = "165859e9e55f79d67b96c5d96f4e88b6f2695a1972849c15a6a3f5c59fc2c003" +dependencies = [ + "memchr", +] + +[[package]] +name = "quinn" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" dependencies = [ "bytes", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.14", + "rustls 0.23.23", "socket2", - "thiserror", + "thiserror 2.0.12", "tokio", "tracing", ] [[package]] name = "quinn-proto" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", - "rand", + "getrandom 0.2.15", + "rand 0.8.5", "ring", "rustc-hash", - "rustls 0.23.14", + "rustls 0.23.23", + "rustls-pki-types", "slab", - "thiserror", + "thiserror 2.0.12", "tinyvec", "tracing", + "web-time", ] [[package]] name = "quinn-udp" -version = "0.5.5" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944" dependencies = [ + "cfg_aliases", "libc", "once_cell", "socket2", @@ -2586,9 +2733,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] @@ -2600,8 +2747,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "zerocopy", ] [[package]] @@ -2611,7 +2769,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", ] [[package]] @@ -2620,28 +2788,37 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.1", ] [[package]] name = "ratatui" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdef7f9be5c0122f890d58bdf4d964349ba6a6161f705907526d891efabba57d" +checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", "cassowary", "compact_str", "crossterm", + "indoc", "instability", "itertools", "lru", "paste", "strum", - "strum_macros", "unicode-segmentation", "unicode-truncate", - "unicode-width 0.1.14", + "unicode-width 0.2.0", ] [[package]] @@ -2666,20 +2843,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" -dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", ] [[package]] @@ -2688,16 +2856,27 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom", + "getrandom 0.2.15", "libredox", - "thiserror", + "thiserror 1.0.69", +] + +[[package]] +name = "redox_users" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" +dependencies = [ + "getrandom 0.2.15", + "libredox", + "thiserror 2.0.12", ] [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -2707,9 +2886,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -2724,12 +2903,12 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "remotefs" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b34c83859b73d72acd9a02090193ef379e669644cea9ab5260a7ad9a0342de30" +checksum = "b229ef0bf00ce8ae4cbe349bd8d71f3473e26de30efa637cfc53e08eaf6867f0" dependencies = [ "log", - "thiserror", + "thiserror 1.0.69", "wildmatch", ] @@ -2744,14 +2923,14 @@ dependencies = [ "path-slash 0.1.5", "remotefs", "rust-s3", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "remotefs-ftp" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87763db466371654509075793e3de3fd78ab295b46628d5b0a04de8bbd43e582" +checksum = "cd5ed3e1a54684a0254980535eb4276dce92f16762f260f713ca9c3d574d9f0e" dependencies = [ "log", "path-slash 0.1.5", @@ -2775,7 +2954,7 @@ dependencies = [ "remotefs", "tar", "tempfile", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-util", ] @@ -2796,9 +2975,9 @@ dependencies = [ [[package]] name = "remotefs-ssh" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b18f2efb0eb0d1c15a1c6be859646dc62124b33fed5b5a3839f09ded0ccfd3ae" +checksum = "7cefa6893f2510787c917be88fb9e14db4b0726bfee069ed22945fdefdcaad18" dependencies = [ "chrono", "lazy-regex", @@ -2806,7 +2985,7 @@ dependencies = [ "path-slash 0.2.1", "remotefs", "ssh2", - "ssh2-config", + "ssh2-config 0.2.3", ] [[package]] @@ -2817,7 +2996,7 @@ checksum = "5d2b34f3ac2069b106c65b2d0c91b9b4b24a0b5fe9585b49f50fff4135f2cff8" dependencies = [ "bytes", "bytestring", - "http 1.1.0", + "http 1.3.1", "httpdate", "indexmap", "log", @@ -2826,7 +3005,7 @@ dependencies = [ "quick-xml 0.31.0", "remotefs", "rustydav", - "thiserror", + "thiserror 1.0.69", "time", ] @@ -2841,10 +3020,10 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.32", "hyper-tls", "ipnet", "js-sys", @@ -2872,19 +3051,20 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.8" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +checksum = "989e327e510263980e231de548a33e63d34962d29ae61b467389a1a09627a254" dependencies = [ "base64 0.22.1", "bytes", "futures-channel", "futures-core", "futures-util", - "http 1.1.0", + "h2 0.4.8", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", + "hyper 1.6.0", "hyper-rustls", "hyper-util", "ipnet", @@ -2895,35 +3075,35 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.14", + "rustls 0.23.23", "rustls-pemfile 2.2.0", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper 1.0.2", "tokio", "tokio-rustls", + "tower 0.5.2", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.26.6", + "webpki-roots 0.26.8", "windows-registry", ] [[package]] name = "ring" -version = "0.17.8" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] @@ -2949,6 +3129,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "rust-fuzzy-search" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a157657054ffe556d8858504af8a672a054a6e0bd9e8ee531059100c0fa11bb2" + [[package]] name = "rust-ini" version = "0.19.0" @@ -2983,8 +3169,8 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "sha2 0.10.8", - "thiserror", + "sha2", + "thiserror 1.0.69", "time", "url", ] @@ -2997,9 +3183,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustc_version" @@ -3012,15 +3198,28 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", "errno", "libc", - "linux-raw-sys", - "windows-sys 0.52.0", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7178faa4b75a30e269c71e61c353ce2748cf3d76f0c44c393f4e60abf49b825" +dependencies = [ + "bitflags 2.9.0", + "errno", + "libc", + "linux-raw-sys 0.9.3", + "windows-sys 0.59.0", ] [[package]] @@ -3037,9 +3236,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.14" +version = "0.23.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" +checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" dependencies = [ "log", "once_cell", @@ -3065,15 +3264,14 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" dependencies = [ "openssl-probe", - "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", - "security-framework 2.11.1", + "security-framework 3.2.0", ] [[package]] @@ -3096,9 +3294,12 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.9.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" +dependencies = [ + "web-time", +] [[package]] name = "rustls-webpki" @@ -3123,9 +3324,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" [[package]] name = "rustydav" @@ -3138,9 +3339,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" @@ -3153,18 +3354,18 @@ dependencies = [ [[package]] name = "scc" -version = "2.2.1" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "553f8299af7450cda9a52d3a370199904e7a46b5ffd1bef187c4a6af3bb6db69" +checksum = "ea091f6cac2595aa38993f04f4ee692ed43757035c36e67c180b6828356385b1" dependencies = [ "sdd", ] [[package]] name = "schannel" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] @@ -3187,9 +3388,9 @@ dependencies = [ [[package]] name = "sdd" -version = "3.0.4" +version = "3.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49c1eeaf4b6a87c7479688c6d52b9f1153cedd3c489300564f932b065c6eab95" +checksum = "584e070911c7017da6cb2eb0788d09f43d789029b5877d3e5ecc8acf86ceee21" [[package]] name = "secrecy" @@ -3207,7 +3408,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -3216,11 +3417,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d0283c0a4a22a0f1b0e4edca251aa20b92fc96eaa09b84bec052f9415e9d71" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", "core-foundation 0.10.0", "core-foundation-sys", "libc", @@ -3229,9 +3430,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -3250,18 +3451,18 @@ dependencies = [ [[package]] name = "self_update" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469a3970061380c19852269f393e74c0fe607a4e23d85267382cf25486aa8de5" +checksum = "d832c086ece0dacc29fb2947bb4219b8f6e12fe9e40b7108f9e57c4224e47b5c" dependencies = [ "either", "flate2", - "hyper 1.4.1", + "hyper 1.6.0", "indicatif", "log", - "quick-xml 0.23.1", + "quick-xml 0.37.2", "regex", - "reqwest 0.12.8", + "reqwest 0.12.14", "self-replace", "semver", "serde_json", @@ -3274,18 +3475,18 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.210" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] @@ -3302,9 +3503,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", @@ -3313,9 +3514,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", "memchr", @@ -3359,23 +3560,23 @@ dependencies = [ [[package]] name = "serial_test" -version = "3.1.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d" +checksum = "1b258109f244e1d6891bf1053a55d63a5cd4f8f4c30cf9a1280989f80e7a1fa9" dependencies = [ "futures", "log", "once_cell", - "parking_lot 0.12.3", + "parking_lot", "scc", "serial_test_derive", ] [[package]] name = "serial_test_derive" -version = "3.1.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" +checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", @@ -3390,20 +3591,7 @@ checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "digest", ] [[package]] @@ -3414,7 +3602,7 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -3440,7 +3628,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" dependencies = [ "libc", - "mio 1.0.2", + "mio", "signal-hook", ] @@ -3459,8 +3647,8 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest 0.10.7", - "rand_core", + "digest", + "rand_core 0.6.4", ] [[package]] @@ -3491,9 +3679,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "smawk" @@ -3503,20 +3691,14 @@ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" [[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", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "spki" version = "0.7.3" @@ -3529,14 +3711,14 @@ dependencies = [ [[package]] name = "ssh2" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7fe461910559f6d5604c3731d00d2aafc4a83d1665922e280f42f9a168d5455" +checksum = "2f84d13b3b8a0d4e91a2629911e951db1bb8671512f5c09d7d4ba34500ba68c8" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.9.0", "libc", "libssh2-sys", - "parking_lot 0.11.2", + "parking_lot", ] [[package]] @@ -3545,12 +3727,30 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98150bad1e8fe53df07f38b53364f4d34e84a6cc2ee9f933e43629571060af65" dependencies = [ - "bitflags 2.6.0", - "dirs", - "thiserror", + "bitflags 2.9.0", + "dirs 5.0.1", + "thiserror 1.0.69", "wildmatch", ] +[[package]] +name = "ssh2-config" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2f7fc951533455d92036f8130c7888d883b9f776b1aa700cda1f7e63e515845" +dependencies = [ + "bitflags 2.9.0", + "dirs 5.0.1", + "thiserror 2.0.12", + "wildmatch", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -3593,23 +3793,23 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "suppaftp" -version = "6.0.1" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d5c3d37ce3092d7148494a30a0f5036f8722792a626b25662a87434d3683c33" +checksum = "41af623c56190e6b251fdd4bd090ac6a2c1309138e779cbdcb980a9e06684edc" dependencies = [ "chrono", "futures-lite", "lazy-regex", "log", "native-tls", - "thiserror", + "thiserror 2.0.12", ] [[package]] name = "syn" -version = "2.0.79" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", @@ -3624,18 +3824,29 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[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", ] [[package]] -name = "sysinfo" -version = "0.31.4" +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355dbe4f8799b304b05e1b0f05fc59b2a18d36645cf169607da45bde2f69a1be" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sysinfo" +version = "0.33.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fc858248ea01b66f19d8e8a6d55f41deaf91e9d495246fd01368d99935c6c01" dependencies = [ "core-foundation-sys", "libc", @@ -3668,9 +3879,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.42" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" +checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" dependencies = [ "filetime", "libc", @@ -3690,14 +3901,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.13.0" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "488960f40a3fd53d72c2a29a58722561dee8afdd175bd88e3db4677d7b2ba600" dependencies = [ - "cfg-if", "fastrand", + "getrandom 0.3.1", "once_cell", - "rustix", + "rustix 1.0.2", "windows-sys 0.59.0", ] @@ -3712,15 +3923,15 @@ dependencies = [ [[package]] name = "termscp" -version = "0.16.1" +version = "0.17.0" dependencies = [ "argh", - "bitflags 2.6.0", + "bitflags 2.9.0", "bytesize", "cfg_aliases", "chrono", "content_inspector", - "dirs", + "dirs 6.0.0", "edit", "filetime", "hostname", @@ -3734,7 +3945,7 @@ dependencies = [ "nucleo", "open", "pretty_assertions", - "rand", + "rand 0.9.0", "regex", "remotefs", "remotefs-aws-s3", @@ -3748,9 +3959,9 @@ dependencies = [ "serde", "serial_test", "simplelog", - "ssh2-config", + "ssh2-config 0.3.0", "tempfile", - "thiserror", + "thiserror 2.0.12", "tokio", "toml", "tui-realm-stdlib", @@ -3765,29 +3976,49 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" +checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" dependencies = [ "smawk", "unicode-linebreak", - "unicode-width 0.1.14", + "unicode-width 0.2.0", ] [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", @@ -3796,20 +4027,18 @@ dependencies = [ [[package]] name = "tiger" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443e531cbcf9de83258cfef70bcd56c91188de5819ebd4b19c85f589e0617005" +checksum = "579abbce4ad73b04386dbeb34369c9873a8f9b749c7b99cbf479a2949ff715ed" dependencies = [ - "block-buffer 0.9.0", - "byteorder", - "digest 0.9.0", + "digest", ] [[package]] name = "time" -version = "0.3.36" +version = "0.3.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "dad298b01a40a23aac4580b67e3dbedb7cc8402f3592d7f49469de2ea4aecdd8" dependencies = [ "deranged", "itoa", @@ -3824,15 +4053,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "765c97a5b985b7c11d7bc27fa927dc4fe6af3a6dfb021d28deb60d3bf51e76ef" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "e8093bc3e81c3bc5f7879de09619d06c9a5a5e45ca44dfeeb7225bae38005c5c" dependencies = [ "num-conv", "time-core", @@ -3848,10 +4077,20 @@ dependencies = [ ] [[package]] -name = "tinyvec" -version = "1.8.0" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" dependencies = [ "tinyvec_macros", ] @@ -3864,26 +4103,26 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.1" +version = "1.44.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2caba9f80616f438e09748d5acda951967e1ea58508ef53d9c6402485a46df" +checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a" dependencies = [ "backtrace", "bytes", "libc", - "mio 0.8.11", + "mio", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", @@ -3902,12 +4141,11 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ - "rustls 0.23.14", - "rustls-pki-types", + "rustls 0.23.23", "tokio", ] @@ -3925,9 +4163,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" dependencies = [ "bytes", "futures-core", @@ -3938,9 +4176,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" dependencies = [ "serde", "serde_spanned", @@ -3959,9 +4197,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.22" +version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ "indexmap", "serde", @@ -3987,6 +4225,21 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 1.0.2", + "tokio", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-http" version = "0.5.2" @@ -3994,9 +4247,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ "base64 0.21.7", - "bitflags 2.6.0", + "bitflags 2.9.0", "bytes", - "http 1.1.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", "mime", @@ -4020,9 +4273,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 = [ "log", "pin-project-lite", @@ -4032,9 +4285,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", @@ -4043,9 +4296,9 @@ 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", ] @@ -4069,15 +4322,15 @@ dependencies = [ [[package]] name = "tuirealm" -version = "2.0.3" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d3865c9f0e84c07c991c24c853f095bb764859fa3806fe6e00b559f40f1253f" +checksum = "435d695a72ceae83f149a0241aad72ae8d3e680ab4d2ed86adb50df611ac026c" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", "crossterm", "lazy-regex", "ratatui", - "thiserror", + "thiserror 2.0.12", "tuirealm_derive", ] @@ -4101,20 +4354,20 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.1.0", + "http 1.3.1", "httparse", "log", - "rand", + "rand 0.8.5", "sha1", - "thiserror", + "thiserror 1.0.69", "utf-8", ] [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "ucd-trie" @@ -4122,17 +4375,11 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-linebreak" @@ -4140,15 +4387,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -4192,9 +4430,9 @@ 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", @@ -4213,6 +4451,18 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uzers" version = "0.12.1" @@ -4231,9 +4481,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "9.0.1" +version = "9.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349ed9e45296a581f455bc18039878f409992999bc1d5da12a6800eb18c8752f" +checksum = "e0d2f179f8075b805a43a2a21728a46f0cc2921b3c58695b28fa8817e103cd9a" dependencies = [ "anyhow", "cargo_metadata", @@ -4248,9 +4498,9 @@ dependencies = [ [[package]] name = "vergen-git2" -version = "1.0.1" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e771aff771c0d7c2f42e434e2766d304d917e29b40f0424e8faaaa936bbc3f29" +checksum = "d86bae87104cb2790cdee615c2bb54729804d307191732ab27b1c5357ea6ddc5" dependencies = [ "anyhow", "derive_builder", @@ -4263,9 +4513,9 @@ dependencies = [ [[package]] name = "vergen-lib" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229eaddb0050920816cf051e619affaf18caa3dd512de8de5839ccbc8e53abb0" +checksum = "9b07e6010c0f3e59fcb164e0163834597da68d1f864e2b8ca49f74de01e9c166" dependencies = [ "anyhow", "derive_builder", @@ -4309,6 +4559,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasite" version = "0.1.0" @@ -4317,24 +4576,24 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -4343,21 +4602,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4365,9 +4625,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -4378,15 +4638,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", @@ -4400,9 +4673,9 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.6" +version = "0.26.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" dependencies = [ "rustls-pki-types", ] @@ -4416,7 +4689,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix", + "rustix 0.38.44", ] [[package]] @@ -4425,7 +4698,7 @@ version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "redox_syscall 0.5.7", + "redox_syscall", "wasite", "web-sys", ] @@ -4575,14 +4848,20 @@ dependencies = [ ] [[package]] -name = "windows-registry" -version = "0.2.0" +name = "windows-link" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" + +[[package]] +name = "windows-registry" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ - "windows-result 0.2.0", + "windows-result 0.3.1", "windows-strings", - "windows-targets 0.52.6", + "windows-targets 0.53.0", ] [[package]] @@ -4596,21 +4875,20 @@ dependencies = [ [[package]] name = "windows-result" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +checksum = "06374efe858fab7e4f881500e6e86ec8bc28f9462c47e5a9941a0142ad86b189" dependencies = [ - "windows-targets 0.52.6", + "windows-link", ] [[package]] name = "windows-strings" -version = "0.1.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" dependencies = [ - "windows-result 0.2.0", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -4664,7 +4942,7 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", @@ -4672,12 +4950,28 @@ dependencies = [ ] [[package]] -name = "windows-version" -version = "0.1.1" +name = "windows-targets" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6998aa457c9ba8ff2fb9f13e9d2a930dabcea28f1d0ab94d687d8b3654844515" +checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" dependencies = [ - "windows-targets 0.52.6", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + +[[package]] +name = "windows-version" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bfbcc4996dd183ff1376a20ade1242da0d2dcaff83cc76710a588d24fd4c5db" +dependencies = [ + "windows-link", ] [[package]] @@ -4692,6 +4986,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -4704,6 +5004,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -4716,12 +5022,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -4734,6 +5052,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -4746,6 +5070,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -4758,6 +5088,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -4771,10 +5107,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "winnow" -version = "0.6.20" +name = "windows_x86_64_msvc" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "winnow" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" dependencies = [ "memchr", ] @@ -4790,14 +5132,34 @@ dependencies = [ ] [[package]] -name = "xattr" -version = "1.3.1" +name = "wit-bindgen-rt" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.9.0", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "xattr" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d65cbf2f12c15564212d48f4e3dfb87923d25d611f2aed18f4cb23f0413d89e" dependencies = [ "libc", - "linux-raw-sys", - "rustix", + "rustix 1.0.2", ] [[package]] @@ -4807,26 +5169,70 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] -name = "zerocopy" -version = "0.7.35" +name = "yoke" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6" dependencies = [ - "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.35" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" @@ -4834,10 +5240,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] -name = "zip" -version = "2.2.0" +name = "zerovec" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zip" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b280484c454e74e5fff658bbf7df8fdbe7a07c6b2de4a53def232c15ef138f3a" dependencies = [ "arbitrary", "crc32fast", @@ -4846,20 +5274,20 @@ dependencies = [ "flate2", "indexmap", "memchr", - "thiserror", + "thiserror 2.0.12", "time", "zopfli", ] [[package]] name = "zipsign-api" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413a546ada9dbcd0b9a3e0b0880581279e35047bce9797e523b3408e1df607c" +checksum = "8e7c724c3a8e5833aad6b7028f4f0989fa3a640ce799bf8c352f417b8ef9db3e" dependencies = [ "base64 0.22.1", "ed25519-dalek", - "thiserror", + "thiserror 2.0.12", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index aa14cb5..2e90d50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Christian Visintin "] categories = ["command-line-utilities"] description = "termscp is a feature rich terminal file transfer and explorer with support for SCP/SFTP/FTP/Kube/S3/WebDAV" -edition = "2021" +edition = "2024" homepage = "https://termscp.veeso.dev" include = ["src/**/*", "build.rs", "LICENSE", "README.md", "CHANGELOG.md"] keywords = ["terminal", "ftp", "scp", "sftp", "tui"] @@ -10,7 +10,7 @@ license = "MIT" name = "termscp" readme = "README.md" repository = "https://github.com/veeso/termscp" -version = "0.16.1" +version = "0.17.0" [package.metadata.rpm] package = "termscp" @@ -33,10 +33,10 @@ path = "src/main.rs" [dependencies] argh = "^0.1" bitflags = "^2" -bytesize = "^1" +bytesize = "^2" chrono = "^0.4" content_inspector = "^0.2" -dirs = "^5.0" +dirs = "^6" edit = "^0.1" filetime = "^0.2" hostname = "^0.4" @@ -48,12 +48,12 @@ keyring = { version = "^3", optional = true, features = [ lazy-regex = "^3" lazy_static = "^1" log = "^0.4" -magic-crypt = "^3" -notify = "6" -notify-rust = { version = "^4.5", default-features = false, features = ["d"] } +magic-crypt = "4" +notify = "8" +notify-rust = { version = "^4", default-features = false, features = ["d"] } nucleo = "0.5" open = "^5.0" -rand = "^0.8.5" +rand = "^0.9" regex = "^1" remotefs = "^0.3" remotefs-aws-s3 = { version = "^0.3", default-features = false, features = [ @@ -63,7 +63,7 @@ remotefs-aws-s3 = { version = "^0.3", default-features = false, features = [ remotefs-kube = "0.4" remotefs-webdav = "^0.2" rpassword = "^7" -self_update = { version = "^0.41", default-features = false, features = [ +self_update = { version = "^0.42", default-features = false, features = [ "rustls", "archive-tar", "archive-zip", @@ -72,10 +72,10 @@ self_update = { version = "^0.41", default-features = false, features = [ ] } serde = { version = "^1", features = ["derive"] } simplelog = "^0.12" -ssh2-config = "^0.2" -tempfile = "^3" -thiserror = "^1" -tokio = { version = "=1.38.1", features = ["rt"] } +ssh2-config = "^0.3" +tempfile = "3" +thiserror = "2" +tokio = { version = "1.44", features = ["rt"] } toml = "^0.8" tui-realm-stdlib = "2" tuirealm = "2" @@ -106,12 +106,12 @@ remotefs-smb = { version = "^0.3", optional = true } [target."cfg(target_family = \"windows\")"] [target."cfg(target_family = \"windows\")".dependencies] remotefs-ftp = { version = "^0.2", features = ["native-tls"] } -remotefs-ssh = "^0.4" +remotefs-ssh = "^0.5" [target."cfg(target_family = \"unix\")"] [target."cfg(target_family = \"unix\")".dependencies] remotefs-ftp = { version = "^0.2", features = ["vendored", "native-tls"] } -remotefs-ssh = { version = "^0.4", features = ["ssh2-vendored"] } +remotefs-ssh = { version = "^0.5", features = ["ssh2-vendored"] } uzers = "0.12" [profile.dev] diff --git a/src/activity_manager.rs b/src/activity_manager.rs index 89d9e5b..89f7af2 100644 --- a/src/activity_manager.rs +++ b/src/activity_manager.rs @@ -243,7 +243,7 @@ impl ActivityManager { None => { return Err(format!( r#"Could not resolve bookmark name: "{bookmark_name}" no such bookmark"# - )) + )); } Some(params) => params, }; @@ -495,19 +495,28 @@ impl ActivityManager { match ThemeProvider::new(theme_path.as_path()) { Ok(provider) => provider, Err(err) => { - error!("Could not initialize theme provider with file '{}': {}; using theme provider in degraded mode", theme_path.display(), err); + error!( + "Could not initialize theme provider with file '{}': {}; using theme provider in degraded mode", + theme_path.display(), + err + ); ThemeProvider::degraded() } } } None => { - error!("This system doesn't provide a configuration directory; using theme provider in degraded mode"); + error!( + "This system doesn't provide a configuration directory; using theme provider in degraded mode" + ); ThemeProvider::degraded() } } } Err(err) => { - error!("Could not initialize configuration directory: {}; using theme provider in degraded mode", err); + error!( + "Could not initialize configuration directory: {}; using theme provider in degraded mode", + err + ); ThemeProvider::degraded() } } diff --git a/src/config/serialization.rs b/src/config/serialization.rs index f19f904..ff625da 100644 --- a/src/config/serialization.rs +++ b/src/config/serialization.rs @@ -4,8 +4,8 @@ use std::io::{Read, Write}; -use serde::de::DeserializeOwned; use serde::Serialize; +use serde::de::DeserializeOwned; use thiserror::Error; /// Contains the error for serializer/deserializer @@ -63,7 +63,7 @@ where return Err(SerializerError::new_ex( SerializerErrorKind::Serialization, err.to_string(), - )) + )); } }; trace!("Serialized new bookmarks data: {}", data); diff --git a/src/explorer/formatter.rs b/src/explorer/formatter.rs index bc3812b..113d00c 100644 --- a/src/explorer/formatter.rs +++ b/src/explorer/formatter.rs @@ -364,8 +364,16 @@ impl Formatter { if fsentry.is_file() { // Get byte size let size: ByteSize = ByteSize(fsentry.metadata().size); + let mut fmt = size.display().si().to_string(); + // pad with up to len 10 + let pad = 10usize.saturating_sub(fmt.len()); + for _ in 0..pad { + fmt.push(' '); + } + + format!("{cur_str}{prefix}{fmt}") // Add to cur str, prefix and the key value - format!("{cur_str}{prefix}{size:10}") + //format!("{cur_str}{prefix}{size:10}", size = size.display().si()) } else if fsentry.metadata().symlink.is_some() { let size = ByteSize( fsentry @@ -376,7 +384,14 @@ impl Formatter { .to_string_lossy() .len() as u64, ); - format!("{cur_str}{prefix}{size:10}") + let mut fmt = size.display().si().to_string(); + // pad with up to len 10 + let pad = 10usize.saturating_sub(fmt.len()); + for _ in 0..pad { + fmt.push(' '); + } + + format!("{cur_str}{prefix}{fmt}") } else { // Add to cur str, prefix and the key value format!("{cur_str}{prefix} ") @@ -596,7 +611,7 @@ mod tests { assert_eq!( formatter.fmt(&entry), format!( - "bar.txt -rw-r--r-- root 8.2 KB {}", + "bar.txt -rw-r--r-- root 8.2 kB {}", fmt_time(t, "%b %d %Y %H:%M") ) ); @@ -604,7 +619,7 @@ mod tests { assert_eq!( formatter.fmt(&entry), format!( - "bar.txt -rw-r--r-- 0 8.2 KB {}", + "bar.txt -rw-r--r-- 0 8.2 kB {}", fmt_time(t, "%b %d %Y %H:%M") ) ); @@ -627,7 +642,7 @@ mod tests { assert_eq!( formatter.fmt(&entry), format!( - "piroparoporoperoperupup… -rw-r--r-- root 8.2 KB {}", + "piroparoporoperoperupup… -rw-r--r-- root 8.2 kB {}", fmt_time(t, "%b %d %Y %H:%M") ) ); @@ -635,7 +650,7 @@ mod tests { assert_eq!( formatter.fmt(&entry), format!( - "piroparoporoperoperupup… -rw-r--r-- 0 8.2 KB {}", + "piroparoporoperoperupup… -rw-r--r-- 0 8.2 kB {}", fmt_time(t, "%b %d %Y %H:%M") ) ); @@ -658,7 +673,7 @@ mod tests { assert_eq!( formatter.fmt(&entry), format!( - "bar.txt -????????? root 8.2 KB {}", + "bar.txt -????????? root 8.2 kB {}", fmt_time(t, "%b %d %Y %H:%M") ) ); @@ -666,7 +681,7 @@ mod tests { assert_eq!( formatter.fmt(&entry), format!( - "bar.txt -????????? 0 8.2 KB {}", + "bar.txt -????????? 0 8.2 kB {}", fmt_time(t, "%b %d %Y %H:%M") ) ); @@ -689,7 +704,7 @@ mod tests { assert_eq!( formatter.fmt(&entry), format!( - "bar.txt -????????? 0 8.2 KB {}", + "bar.txt -????????? 0 8.2 kB {}", fmt_time(t, "%b %d %Y %H:%M") ) ); @@ -697,7 +712,7 @@ mod tests { assert_eq!( formatter.fmt(&entry), format!( - "bar.txt -????????? 0 8.2 KB {}", + "bar.txt -????????? 0 8.2 kB {}", fmt_time(t, "%b %d %Y %H:%M") ) ); @@ -774,8 +789,9 @@ mod tests { #[test] fn test_fs_explorer_formatter_all_together_now() { - let formatter: Formatter = - Formatter::new("{NAME:16} {SYMLINK:12} {GROUP} {USER} {PEX} {SIZE} {ATIME:20:%a %b %d %Y %H:%M} {CTIME:20:%a %b %d %Y %H:%M} {MTIME:20:%a %b %d %Y %H:%M}"); + let formatter: Formatter = Formatter::new( + "{NAME:16} {SYMLINK:12} {GROUP} {USER} {PEX} {SIZE} {ATIME:20:%a %b %d %Y %H:%M} {CTIME:20:%a %b %d %Y %H:%M} {MTIME:20:%a %b %d %Y %H:%M}", + ); // Directory (with symlink) let t: SystemTime = SystemTime::now(); let entry = File { @@ -792,12 +808,15 @@ mod tests { mode: Some(UnixPex::from(0o755)), }, }; - assert_eq!(formatter.fmt(&entry), format!( - "projects -> project.info 0 0 lrwxr-xr-x 12 B {} {} {}", - fmt_time(t, "%a %b %d %Y %H:%M"), - fmt_time(t, "%a %b %d %Y %H:%M"), - fmt_time(t, "%a %b %d %Y %H:%M"), - )); + assert_eq!( + formatter.fmt(&entry), + format!( + "projects -> project.info 0 0 lrwxr-xr-x 12 B {} {} {}", + fmt_time(t, "%a %b %d %Y %H:%M"), + fmt_time(t, "%a %b %d %Y %H:%M"), + fmt_time(t, "%a %b %d %Y %H:%M"), + ) + ); // Directory without symlink let entry = File { path: PathBuf::from("/home/cvisintin/projects"), @@ -813,12 +832,15 @@ mod tests { mode: Some(UnixPex::from(0o755)), }, }; - assert_eq!(formatter.fmt(&entry), format!( - "projects/ 0 0 drwxr-xr-x {} {} {}", - fmt_time(t, "%a %b %d %Y %H:%M"), - fmt_time(t, "%a %b %d %Y %H:%M"), - fmt_time(t, "%a %b %d %Y %H:%M"), - )); + assert_eq!( + formatter.fmt(&entry), + format!( + "projects/ 0 0 drwxr-xr-x {} {} {}", + fmt_time(t, "%a %b %d %Y %H:%M"), + fmt_time(t, "%a %b %d %Y %H:%M"), + fmt_time(t, "%a %b %d %Y %H:%M"), + ) + ); // File with symlink let entry = File { path: PathBuf::from("/bar.txt"), @@ -834,12 +856,15 @@ mod tests { mode: Some(UnixPex::from(0o644)), }, }; - assert_eq!(formatter.fmt(&entry), format!( - "bar.txt -> project.info 0 0 lrw-r--r-- 12 B {} {} {}", - fmt_time(t, "%a %b %d %Y %H:%M"), - fmt_time(t, "%a %b %d %Y %H:%M"), - fmt_time(t, "%a %b %d %Y %H:%M"), - )); + assert_eq!( + formatter.fmt(&entry), + format!( + "bar.txt -> project.info 0 0 lrw-r--r-- 12 B {} {} {}", + fmt_time(t, "%a %b %d %Y %H:%M"), + fmt_time(t, "%a %b %d %Y %H:%M"), + fmt_time(t, "%a %b %d %Y %H:%M"), + ) + ); // File without symlink let entry = File { path: PathBuf::from("/bar.txt"), @@ -855,12 +880,15 @@ mod tests { mode: Some(UnixPex::from(0o644)), }, }; - assert_eq!(formatter.fmt(&entry), format!( - "bar.txt 0 0 -rw-r--r-- 8.2 KB {} {} {}", - fmt_time(t, "%a %b %d %Y %H:%M"), - fmt_time(t, "%a %b %d %Y %H:%M"), - fmt_time(t, "%a %b %d %Y %H:%M"), - )); + assert_eq!( + formatter.fmt(&entry), + format!( + "bar.txt 0 0 -rw-r--r-- 8.2 kB {} {} {}", + fmt_time(t, "%a %b %d %Y %H:%M"), + fmt_time(t, "%a %b %d %Y %H:%M"), + fmt_time(t, "%a %b %d %Y %H:%M"), + ) + ); } #[test] diff --git a/src/explorer/mod.rs b/src/explorer/mod.rs index ff15935..b191c84 100644 --- a/src/explorer/mod.rs +++ b/src/explorer/mod.rs @@ -523,7 +523,7 @@ mod tests { assert_eq!( explorer.fmt_file(&entry), format!( - "bar.txt -rw-r--r-- root 8.2 KB {}", + "bar.txt -rw-r--r-- root 8.2 kB {}", fmt_time(t, "%b %d %Y %H:%M") ) ); @@ -531,7 +531,7 @@ mod tests { assert_eq!( explorer.fmt_file(&entry), format!( - "bar.txt -rw-r--r-- 0 8.2 KB {}", + "bar.txt -rw-r--r-- 0 8.2 kB {}", fmt_time(t, "%b %d %Y %H:%M") ) ); diff --git a/src/filetransfer/params.rs b/src/filetransfer/params.rs index d6d3ea8..86a4ec7 100644 --- a/src/filetransfer/params.rs +++ b/src/filetransfer/params.rs @@ -301,11 +301,13 @@ mod test { #[test] fn password_missing() { - assert!(FileTransferParams::new( - FileTransferProtocol::Scp, - ProtocolParams::AwsS3(AwsS3Params::new("omar", Some("eu-west-1"), Some("test"))) - ) - .password_missing()); + assert!( + FileTransferParams::new( + FileTransferProtocol::Scp, + ProtocolParams::AwsS3(AwsS3Params::new("omar", Some("eu-west-1"), Some("test"))) + ) + .password_missing() + ); assert_eq!( FileTransferParams::new( FileTransferProtocol::Scp, diff --git a/src/host/bridge.rs b/src/host/bridge.rs index e488121..a31d44a 100644 --- a/src/host/bridge.rs +++ b/src/host/bridge.rs @@ -1,8 +1,8 @@ use std::io::{Read, Write}; use std::path::{Path, PathBuf}; -use remotefs::fs::{Metadata, UnixPex}; use remotefs::File; +use remotefs::fs::{Metadata, UnixPex}; use super::HostResult; diff --git a/src/host/localhost.rs b/src/host/localhost.rs index daf276a..ce5ba2a 100644 --- a/src/host/localhost.rs +++ b/src/host/localhost.rs @@ -5,8 +5,8 @@ use std::os::unix::fs::PermissionsExt as _; use std::path::{Path, PathBuf}; use filetime::FileTime; -use remotefs::fs::{FileType, Metadata, UnixPex}; use remotefs::File; +use remotefs::fs::{FileType, Metadata, UnixPex}; use super::{HostBridge, HostResult}; use crate::host::{HostError, HostErrorType}; @@ -105,8 +105,8 @@ impl HostBridge for Localhost { )); } let prev_dir: PathBuf = self.wrkdir.clone(); // Backup location - // Update working directory - // Change dir + // Update working directory + // Change dir self.wrkdir = new_dir; // Scan new directory let pwd = self.pwd()?; @@ -135,7 +135,7 @@ impl HostBridge for Localhost { HostErrorType::FileAlreadyExists, None, dir_path.as_path(), - )) + )); } } } @@ -559,7 +559,7 @@ mod tests { use std::io::Write; use std::ops::AddAssign; #[cfg(posix)] - use std::os::unix::fs::{symlink, PermissionsExt}; + use std::os::unix::fs::{PermissionsExt, symlink}; use std::time::{Duration, SystemTime}; use pretty_assertions::assert_eq; @@ -661,9 +661,10 @@ mod tests { #[should_panic] fn test_host_localhost_open_read_err_no_such_file() { let mut host: Localhost = Localhost::new(PathBuf::from("/dev")).ok().unwrap(); - assert!(host - .open_file(PathBuf::from("/bin/foo-bar-test-omar-123-456-789.txt").as_path()) - .is_ok()); + assert!( + host.open_file(PathBuf::from("/bin/foo-bar-test-omar-123-456-789.txt").as_path()) + .is_ok() + ); } #[test] @@ -704,11 +705,13 @@ mod tests { // Create sample file assert!(StdFile::create(format!("{}/foo.txt", tmpdir.path().display()).as_str()).is_ok()); // Create symlink - assert!(symlink( - format!("{}/foo.txt", tmpdir.path().display()), - format!("{}/bar.txt", tmpdir.path().display()) - ) - .is_ok()); + assert!( + symlink( + format!("{}/foo.txt", tmpdir.path().display()), + format!("{}/bar.txt", tmpdir.path().display()) + ) + .is_ok() + ); // Get dir let host: Localhost = Localhost::new(PathBuf::from(tmpdir.path())).ok().unwrap(); let files: Vec = host.files.clone(); @@ -744,19 +747,21 @@ mod tests { assert!(host.mkdir(PathBuf::from("test_dir").as_path()).is_ok()); let files: Vec = host.files.clone(); assert_eq!(files.len(), 1); // There should be 1 file now - // Try to re-create directory + // Try to re-create directory assert!(host.mkdir(PathBuf::from("test_dir").as_path()).is_err()); // Try abs path - assert!(host - .mkdir_ex(PathBuf::from("/tmp/test_dir_123456789").as_path(), true) - .is_ok()); + assert!( + host.mkdir_ex(PathBuf::from("/tmp/test_dir_123456789").as_path(), true) + .is_ok() + ); // Fail - assert!(host - .mkdir_ex( + assert!( + host.mkdir_ex( PathBuf::from("/aaaa/oooooo/tmp/test_dir_123456789").as_path(), true ) - .is_err()); + .is_err() + ); } #[test] @@ -768,24 +773,26 @@ mod tests { let mut host: Localhost = Localhost::new(PathBuf::from(tmpdir.path())).ok().unwrap(); let files: Vec = host.files.clone(); assert_eq!(files.len(), 1); // There should be 1 file now - // Remove file + // Remove file assert!(host.remove(files.get(0).unwrap()).is_ok()); // There should be 0 files now let files: Vec = host.files.clone(); assert_eq!(files.len(), 0); // There should be 0 files now - // Create directory + // Create directory assert!(host.mkdir(PathBuf::from("test_dir").as_path()).is_ok()); // Delete directory let files: Vec = host.files.clone(); assert_eq!(files.len(), 1); // There should be 1 file now assert!(host.remove(files.get(0).unwrap()).is_ok()); // Remove unexisting directory - assert!(host - .remove(&make_fsentry(PathBuf::from("/a/b/c/d"), true)) - .is_err()); - assert!(host - .remove(&make_fsentry(PathBuf::from("/aaaaaaa"), false)) - .is_err()); + assert!( + host.remove(&make_fsentry(PathBuf::from("/a/b/c/d"), true)) + .is_err() + ); + assert!( + host.remove(&make_fsentry(PathBuf::from("/aaaaaaa"), false)) + .is_err() + ); } #[test] @@ -803,18 +810,20 @@ mod tests { // Rename file let dst_path: PathBuf = PathBuf::from(format!("{}/bar.txt", tmpdir.path().display()).as_str()); - assert!(host - .rename(files.get(0).unwrap(), dst_path.as_path()) - .is_ok()); + assert!( + host.rename(files.get(0).unwrap(), dst_path.as_path()) + .is_ok() + ); // There should be still 1 file now, but named bar.txt let files: Vec = host.files.clone(); assert_eq!(files.len(), 1); // There should be 0 files now assert_eq!(files.get(0).unwrap().name(), "bar.txt"); // Fail let bad_path: PathBuf = PathBuf::from("/asdailsjoidoewojdijow/ashdiuahu"); - assert!(host - .rename(files.get(0).unwrap(), bad_path.as_path()) - .is_err()); + assert!( + host.rename(files.get(0).unwrap(), bad_path.as_path()) + .is_err() + ); } #[test] @@ -853,12 +862,13 @@ mod tests { // Chmod to dir assert!(host.chmod(tmpdir.path(), UnixPex::from(0o750)).is_ok()); // Error - assert!(host - .chmod( + assert!( + host.chmod( Path::new("/tmp/krgiogoiegj/kwrgnoerig"), UnixPex::from(0o777) ) - .is_err()); + .is_err() + ); } #[cfg(posix)] @@ -883,12 +893,13 @@ mod tests { // Verify host has two files assert_eq!(host.files.len(), 2); // Fail copy - assert!(host - .copy( + assert!( + host.copy( &make_fsentry(PathBuf::from("/a/a7/a/a7a"), false), PathBuf::from("571k422i").as_path() ) - .is_err()); + .is_err() + ); } #[cfg(posix)] @@ -996,9 +1007,10 @@ mod tests { assert!(host.symlink(Path::new("link.txt"), p.as_path()).is_ok()); // Fail symlink assert!(host.symlink(Path::new("link.txt"), p.as_path()).is_err()); - assert!(host - .symlink(Path::new("/tmp/oooo/aaaa"), p.as_path()) - .is_err()); + assert!( + host.symlink(Path::new("/tmp/oooo/aaaa"), p.as_path()) + .is_err() + ); } #[test] diff --git a/src/system/auto_update.rs b/src/system/auto_update.rs index 37adacc..f66e9ff 100644 --- a/src/system/auto_update.rs +++ b/src/system/auto_update.rs @@ -5,7 +5,7 @@ use self_update::backends::github::Update as GithubUpdater; pub use self_update::errors::Error as UpdateError; use self_update::update::Release as UpdRelease; -use self_update::{cargo_crate_version, Status}; +use self_update::{Status, cargo_crate_version}; use crate::utils::parser::parse_semver; diff --git a/src/system/bookmarks_client.rs b/src/system/bookmarks_client.rs index 2c3c04a..0f2ad50 100644 --- a/src/system/bookmarks_client.rs +++ b/src/system/bookmarks_client.rs @@ -16,7 +16,7 @@ use super::keys::{KeyStorage, KeyStorageError}; // Local use crate::config::{ bookmarks::{Bookmark, UserHosts}, - serialization::{deserialize, serialize, SerializerError, SerializerErrorKind}, + serialization::{SerializerError, SerializerErrorKind, deserialize, serialize}, }; use crate::filetransfer::FileTransferParams; use crate::utils::crypto; diff --git a/src/system/config_client.rs b/src/system/config_client.rs index 7d79999..977a144 100644 --- a/src/system/config_client.rs +++ b/src/system/config_client.rs @@ -4,14 +4,14 @@ // Locals // Ext -use std::fs::{create_dir, remove_file, File, OpenOptions}; +use std::fs::{File, OpenOptions, create_dir, remove_file}; use std::io::Write; use std::path::{Path, PathBuf}; use std::str::FromStr; use std::string::ToString; -use crate::config::params::{UserConfig, DEFAULT_NOTIFICATION_TRANSFER_THRESHOLD}; -use crate::config::serialization::{deserialize, serialize, SerializerError, SerializerErrorKind}; +use crate::config::params::{DEFAULT_NOTIFICATION_TRANSFER_THRESHOLD, UserConfig}; +use crate::config::serialization::{SerializerError, SerializerErrorKind, deserialize, serialize}; use crate::explorer::GroupDirs; use crate::filetransfer::FileTransferProtocol; @@ -480,9 +480,11 @@ mod tests { // Change some stuff client.set_text_editor(PathBuf::from("/usr/bin/vim")); client.set_default_protocol(FileTransferProtocol::Scp); - assert!(client - .add_ssh_key("192.168.1.31", "pi", "piroporopero") - .is_ok()); + assert!( + client + .add_ssh_key("192.168.1.31", "pi", "piroporopero") + .is_ok() + ); assert!(client.write_config().is_ok()); // Istantiate a new client let client: ConfigClient = ConfigClient::new(cfg_path.as_path(), key_path.as_path()) @@ -678,9 +680,11 @@ mod tests { .unwrap(); // Add a new key let rsa_key: String = get_sample_rsa_key(); - assert!(client - .add_ssh_key("192.168.1.31", "pi", rsa_key.as_str()) - .is_ok()); + assert!( + client + .add_ssh_key("192.168.1.31", "pi", rsa_key.as_str()) + .is_ok() + ); // Iterate keys for key in client.iter_ssh_keys() { let host: SshHost = client.get_ssh_key(key).ok().unwrap().unwrap(); diff --git a/src/system/logging.rs b/src/system/logging.rs index fb9bcc3..40cfdbc 100644 --- a/src/system/logging.rs +++ b/src/system/logging.rs @@ -16,7 +16,7 @@ pub fn init(level: LogLevel) -> Result<(), String> { Ok(None) => { return Err(String::from( "This system doesn't seem to support CACHE_DIR", - )) + )); } Err(err) => return Err(err), }; diff --git a/src/system/sshkey_storage.rs b/src/system/sshkey_storage.rs index 477b378..2424f31 100644 --- a/src/system/sshkey_storage.rs +++ b/src/system/sshkey_storage.rs @@ -123,9 +123,11 @@ mod tests { .ok() .unwrap(); // Add ssh key - assert!(client - .add_ssh_key("192.168.1.31", "pi", "piroporopero") - .is_ok()); + assert!( + client + .add_ssh_key("192.168.1.31", "pi", "piroporopero") + .is_ok() + ); // Create ssh key storage let storage: SshKeyStorage = SshKeyStorage::from(&client); // Verify key exists @@ -141,7 +143,9 @@ mod tests { #[test] fn sould_resolve_key_from_ssh2_config() { - let rsa_key = test_helpers::create_sample_file_with_content("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDErJhQxEI0+VvhlXVUyh+vMCm7aXfCA/g633AG8ezD/5EylwchtAr2JCoBWnxn4zV8nI9dMqOgm0jO4IsXpKOjQojv+0VOH7I+cDlBg0tk4hFlvyyS6YviDAfDDln3jYUM+5QNDfQLaZlH2WvcJ3mkDxLVlI9MBX1BAeSmChLxwAvxALp2ncImNQLzDO9eHcig3dtMrEKkzXQowRW5Y7eUzg2+vvVq4H2DOjWwUndvB5sJkhEfTUVE7ID8ZdGJo60kUb/02dZYj+IbkAnMCsqktk0cg/4XFX82hEfRYFeb1arkysFisPU1DOb6QielL/axeTebVplaouYcXY0pFdJt root@8c50fd4c345a"); + let rsa_key = test_helpers::create_sample_file_with_content( + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDErJhQxEI0+VvhlXVUyh+vMCm7aXfCA/g633AG8ezD/5EylwchtAr2JCoBWnxn4zV8nI9dMqOgm0jO4IsXpKOjQojv+0VOH7I+cDlBg0tk4hFlvyyS6YviDAfDDln3jYUM+5QNDfQLaZlH2WvcJ3mkDxLVlI9MBX1BAeSmChLxwAvxALp2ncImNQLzDO9eHcig3dtMrEKkzXQowRW5Y7eUzg2+vvVq4H2DOjWwUndvB5sJkhEfTUVE7ID8ZdGJo60kUb/02dZYj+IbkAnMCsqktk0cg/4XFX82hEfRYFeb1arkysFisPU1DOb6QielL/axeTebVplaouYcXY0pFdJt root@8c50fd4c345a", + ); let ssh_config_file = test_helpers::create_sample_file_with_content(format!( r#" Host test diff --git a/src/system/theme_provider.rs b/src/system/theme_provider.rs index b088553..7190e96 100644 --- a/src/system/theme_provider.rs +++ b/src/system/theme_provider.rs @@ -8,7 +8,7 @@ use std::fs::OpenOptions; use std::path::{Path, PathBuf}; use std::string::ToString; -use crate::config::serialization::{deserialize, serialize, SerializerError, SerializerErrorKind}; +use crate::config::serialization::{SerializerError, SerializerErrorKind, deserialize, serialize}; use crate::config::themes::Theme; /// ThemeProvider provides a high level API to communicate with the termscp theme diff --git a/src/system/watcher/mod.rs b/src/system/watcher/mod.rs index 9a74718..0da7fa1 100644 --- a/src/system/watcher/mod.rs +++ b/src/system/watcher/mod.rs @@ -7,7 +7,7 @@ mod change; // -- export use std::collections::HashMap; use std::path::{Path, PathBuf}; -use std::sync::mpsc::{channel, Receiver, RecvTimeoutError}; +use std::sync::mpsc::{Receiver, RecvTimeoutError, channel}; use std::time::Duration; pub use change::FsChange; @@ -245,9 +245,11 @@ mod test { fn should_watch_path() { let mut watcher = FsWatcher::init(Duration::from_secs(5)).unwrap(); let tempdir = TempDir::new().unwrap(); - assert!(watcher - .watch(tempdir.path(), Path::new("/tmp/test")) - .is_ok()); + assert!( + watcher + .watch(tempdir.path(), Path::new("/tmp/test")) + .is_ok() + ); // check if in paths assert_eq!( watcher.paths.get(tempdir.path()).unwrap(), @@ -261,16 +263,20 @@ mod test { fn should_not_watch_path_if_subdir_of_watched_path() { let mut watcher = FsWatcher::init(Duration::from_secs(5)).unwrap(); let tempdir = TempDir::new().unwrap(); - assert!(watcher - .watch(tempdir.path(), Path::new("/tmp/test")) - .is_ok()); + assert!( + watcher + .watch(tempdir.path(), Path::new("/tmp/test")) + .is_ok() + ); // watch subdir let mut subdir = tempdir.path().to_path_buf(); subdir.push("abc/def"); // should return already watched - assert!(watcher - .watch(subdir.as_path(), Path::new("/tmp/test/abc/def")) - .is_err()); + assert!( + watcher + .watch(subdir.as_path(), Path::new("/tmp/test/abc/def")) + .is_err() + ); // close tempdir assert!(tempdir.close().is_ok()); } @@ -279,9 +285,11 @@ mod test { fn should_unwatch_path() { let mut watcher = FsWatcher::init(Duration::from_secs(5)).unwrap(); let tempdir = TempDir::new().unwrap(); - assert!(watcher - .watch(tempdir.path(), Path::new("/tmp/test")) - .is_ok()); + assert!( + watcher + .watch(tempdir.path(), Path::new("/tmp/test")) + .is_ok() + ); // unwatch assert!(watcher.unwatch(tempdir.path()).is_ok()); assert!(watcher.paths.get(tempdir.path()).is_none()); @@ -293,9 +301,11 @@ mod test { fn should_unwatch_path_when_subdir() { let mut watcher = FsWatcher::init(Duration::from_secs(5)).unwrap(); let tempdir = TempDir::new().unwrap(); - assert!(watcher - .watch(tempdir.path(), Path::new("/tmp/test")) - .is_ok()); + assert!( + watcher + .watch(tempdir.path(), Path::new("/tmp/test")) + .is_ok() + ); // unwatch let mut subdir = tempdir.path().to_path_buf(); subdir.push("abc/def"); @@ -318,9 +328,11 @@ mod test { fn should_tell_whether_path_is_watched() { let mut watcher = FsWatcher::init(Duration::from_secs(5)).unwrap(); let tempdir = TempDir::new().unwrap(); - assert!(watcher - .watch(tempdir.path(), Path::new("/tmp/test")) - .is_ok()); + assert!( + watcher + .watch(tempdir.path(), Path::new("/tmp/test")) + .is_ok() + ); assert_eq!(watcher.watched(tempdir.path()), true); let mut subdir = tempdir.path().to_path_buf(); subdir.push("abc/def"); @@ -336,9 +348,11 @@ mod test { let mut watcher = FsWatcher::init(Duration::from_millis(100)).unwrap(); let tempdir = TempDir::new().unwrap(); let tempdir_path = PathBuf::from(format!("/private{}", tempdir.path().display())); - assert!(watcher - .watch(tempdir_path.as_path(), Path::new("/tmp/test")) - .is_ok()); + assert!( + watcher + .watch(tempdir_path.as_path(), Path::new("/tmp/test")) + .is_ok() + ); // create file let file_path = test_helpers::make_file_at(tempdir_path.as_path(), "test.txt").unwrap(); // wait @@ -362,9 +376,11 @@ mod test { let mut watcher = FsWatcher::init(Duration::from_millis(100)).unwrap(); let tempdir = TempDir::new().unwrap(); let tempdir_path = PathBuf::from(format!("/private{}", tempdir.path().display())); - assert!(watcher - .watch(tempdir_path.as_path(), Path::new("/tmp/test")) - .is_ok()); + assert!( + watcher + .watch(tempdir_path.as_path(), Path::new("/tmp/test")) + .is_ok() + ); // create file let file_path = test_helpers::make_file_at(tempdir_path.as_path(), "test.txt").unwrap(); std::thread::sleep(Duration::from_millis(500)); @@ -424,9 +440,11 @@ mod test { fn should_poll_nothing() { let mut watcher = FsWatcher::init(Duration::from_secs(5)).unwrap(); let tempdir = TempDir::new().unwrap(); - assert!(watcher - .watch(tempdir.path(), Path::new("/tmp/test")) - .is_ok()); + assert!( + watcher + .watch(tempdir.path(), Path::new("/tmp/test")) + .is_ok() + ); assert!(watcher.poll().ok().unwrap().is_none()); // close tempdir assert!(tempdir.close().is_ok()); @@ -437,9 +455,11 @@ mod test { fn should_get_watched_paths() { let mut watcher = FsWatcher::init(Duration::from_secs(5)).unwrap(); assert!(watcher.watch(Path::new("/tmp"), Path::new("/tmp")).is_ok()); - assert!(watcher - .watch(Path::new("/home"), Path::new("/home")) - .is_ok()); + assert!( + watcher + .watch(Path::new("/home"), Path::new("/home")) + .is_ok() + ); let mut watched_paths = watcher.watched_paths(); watched_paths.sort(); assert_eq!(watched_paths, vec![Path::new("/home"), Path::new("/tmp")]); diff --git a/src/ui/activities/auth/bookmarks.rs b/src/ui/activities/auth/bookmarks.rs index db504bc..3e70e62 100644 --- a/src/ui/activities/auth/bookmarks.rs +++ b/src/ui/activities/auth/bookmarks.rs @@ -4,11 +4,11 @@ // Locals use super::{AuthActivity, FileTransferParams, FormTab, HostBridgeProtocol}; +use crate::filetransfer::HostBridgeParams; use crate::filetransfer::params::{ AwsS3Params, GenericProtocolParams, KubeProtocolParams, ProtocolParams, SmbParams, WebDAVProtocolParams, }; -use crate::filetransfer::HostBridgeParams; impl AuthActivity { /// Delete bookmark diff --git a/src/ui/activities/auth/components/form.rs b/src/ui/activities/auth/components/form.rs index b60f041..e2bed3a 100644 --- a/src/ui/activities/auth/components/form.rs +++ b/src/ui/activities/auth/components/form.rs @@ -10,14 +10,13 @@ use tuirealm::{Component, Event, MockComponent, NoUserEvent, State, StateValue}; use super::{FileTransferProtocol, FormMsg, Msg, UiMsg}; use crate::ui::activities::auth::{ - FormTab, HostBridgeProtocol, UiAuthFormMsg, HOST_BRIDGE_RADIO_PROTOCOL_FTP, - HOST_BRIDGE_RADIO_PROTOCOL_FTPS, HOST_BRIDGE_RADIO_PROTOCOL_KUBE, - HOST_BRIDGE_RADIO_PROTOCOL_LOCALHOST, HOST_BRIDGE_RADIO_PROTOCOL_S3, - HOST_BRIDGE_RADIO_PROTOCOL_SCP, HOST_BRIDGE_RADIO_PROTOCOL_SFTP, - HOST_BRIDGE_RADIO_PROTOCOL_SMB, HOST_BRIDGE_RADIO_PROTOCOL_WEBDAV, REMOTE_RADIO_PROTOCOL_FTP, - REMOTE_RADIO_PROTOCOL_FTPS, REMOTE_RADIO_PROTOCOL_KUBE, REMOTE_RADIO_PROTOCOL_S3, - REMOTE_RADIO_PROTOCOL_SCP, REMOTE_RADIO_PROTOCOL_SFTP, REMOTE_RADIO_PROTOCOL_SMB, - REMOTE_RADIO_PROTOCOL_WEBDAV, + FormTab, HOST_BRIDGE_RADIO_PROTOCOL_FTP, HOST_BRIDGE_RADIO_PROTOCOL_FTPS, + HOST_BRIDGE_RADIO_PROTOCOL_KUBE, HOST_BRIDGE_RADIO_PROTOCOL_LOCALHOST, + HOST_BRIDGE_RADIO_PROTOCOL_S3, HOST_BRIDGE_RADIO_PROTOCOL_SCP, HOST_BRIDGE_RADIO_PROTOCOL_SFTP, + HOST_BRIDGE_RADIO_PROTOCOL_SMB, HOST_BRIDGE_RADIO_PROTOCOL_WEBDAV, HostBridgeProtocol, + REMOTE_RADIO_PROTOCOL_FTP, REMOTE_RADIO_PROTOCOL_FTPS, REMOTE_RADIO_PROTOCOL_KUBE, + REMOTE_RADIO_PROTOCOL_S3, REMOTE_RADIO_PROTOCOL_SCP, REMOTE_RADIO_PROTOCOL_SFTP, + REMOTE_RADIO_PROTOCOL_SMB, REMOTE_RADIO_PROTOCOL_WEBDAV, UiAuthFormMsg, }; // -- protocol @@ -93,10 +92,10 @@ impl Component for RemoteProtocolRadio { code: Key::Down, .. }) => return Some(Msg::Ui(UiMsg::Remote(UiAuthFormMsg::ProtocolBlurDown))), Event::Keyboard(KeyEvent { code: Key::Up, .. }) => { - return Some(Msg::Ui(UiMsg::Remote(UiAuthFormMsg::ProtocolBlurUp))) + return Some(Msg::Ui(UiMsg::Remote(UiAuthFormMsg::ProtocolBlurUp))); } Event::Keyboard(KeyEvent { code: Key::Tab, .. }) => { - return Some(Msg::Ui(UiMsg::Remote(UiAuthFormMsg::ParamsFormBlur))) + return Some(Msg::Ui(UiMsg::Remote(UiAuthFormMsg::ParamsFormBlur))); } Event::Keyboard(KeyEvent { code: Key::BackTab, .. @@ -228,10 +227,10 @@ impl Component for HostBridgeProtocolRadio { code: Key::Down, .. }) => return Some(Msg::Ui(UiMsg::HostBridge(UiAuthFormMsg::ProtocolBlurDown))), Event::Keyboard(KeyEvent { code: Key::Up, .. }) => { - return Some(Msg::Ui(UiMsg::HostBridge(UiAuthFormMsg::ProtocolBlurUp))) + return Some(Msg::Ui(UiMsg::HostBridge(UiAuthFormMsg::ProtocolBlurUp))); } Event::Keyboard(KeyEvent { code: Key::Tab, .. }) => { - return Some(Msg::Ui(UiMsg::HostBridge(UiAuthFormMsg::ParamsFormBlur))) + return Some(Msg::Ui(UiMsg::HostBridge(UiAuthFormMsg::ParamsFormBlur))); } Event::Keyboard(KeyEvent { code: Key::BackTab, .. diff --git a/src/ui/activities/auth/misc.rs b/src/ui/activities/auth/misc.rs index 5e7926b..d24c02b 100644 --- a/src/ui/activities/auth/misc.rs +++ b/src/ui/activities/auth/misc.rs @@ -5,8 +5,8 @@ use std::env; use super::{AuthActivity, FileTransferParams, FileTransferProtocol, FormTab, HostBridgeProtocol}; -use crate::filetransfer::params::ProtocolParams; use crate::filetransfer::HostBridgeParams; +use crate::filetransfer::params::ProtocolParams; use crate::system::auto_update::{Release, Update, UpdateStatus}; use crate::system::notifications::Notification; diff --git a/src/ui/activities/auth/mod.rs b/src/ui/activities/auth/mod.rs index 371a260..ff6e376 100644 --- a/src/ui/activities/auth/mod.rs +++ b/src/ui/activities/auth/mod.rs @@ -17,7 +17,7 @@ use tuirealm::application::PollStrategy; use tuirealm::listener::EventListenerCfg; use tuirealm::{Application, NoUserEvent, Update}; -use super::{Activity, Context, ExitReason, CROSSTERM_MAX_POLL}; +use super::{Activity, CROSSTERM_MAX_POLL, Context, ExitReason}; use crate::config::themes::Theme; use crate::filetransfer::{FileTransferParams, FileTransferProtocol}; use crate::system::bookmarks_client::BookmarksClient; diff --git a/src/ui/activities/auth/update.rs b/src/ui/activities/auth/update.rs index 3345437..e82db2a 100644 --- a/src/ui/activities/auth/update.rs +++ b/src/ui/activities/auth/update.rs @@ -181,10 +181,11 @@ impl AuthActivity { assert!(self.app.active(id).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::AddressBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::Protocol)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::Protocol)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::AddressBlurUp) => { assert!(self.app.active(&Id::Remote(AuthFormId::Protocol)).is_ok()); @@ -196,10 +197,11 @@ impl AuthActivity { assert!(self.app.active(&Id::BookmarkSavePassword).is_ok()); } UiMsg::BookmarksTabBlur => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::Protocol)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::Protocol)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::ChangeFormTab) => { self.last_form_tab = FormTab::Remote; @@ -207,10 +209,11 @@ impl AuthActivity { } UiMsg::Remote(UiAuthFormMsg::ChangeFormTab) => { self.last_form_tab = FormTab::HostBridge; - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::Protocol)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::Protocol)) + .is_ok() + ); } UiMsg::CloseDeleteBookmark => { assert!(self.app.umount(&Id::DeleteBookmarkPopup).is_ok()); @@ -237,25 +240,28 @@ impl AuthActivity { assert!(self.app.umount(&Id::BookmarkSavePassword).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::LocalDirectoryBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::Protocol)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::Protocol)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::LocalDirectoryBlurDown) => { assert!(self.app.active(&Id::Remote(AuthFormId::Protocol)).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::LocalDirectoryBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::RemoteDirectory)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::RemoteDirectory)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::LocalDirectoryBlurUp) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::RemoteDirectory)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::RemoteDirectory)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::ParamsFormBlur) => { assert!(self.app.active(&Id::BookmarksList).is_ok()); @@ -264,482 +270,548 @@ impl AuthActivity { assert!(self.app.active(&Id::BookmarksList).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::PasswordBlurDown) => { - assert!(self - .app - .active(match self.host_bridge_input_mask() { - InputMask::Localhost => unreachable!(), - InputMask::Generic => &Id::HostBridge(AuthFormId::RemoteDirectory), - #[cfg(posix)] - InputMask::Smb => &Id::HostBridge(AuthFormId::SmbWorkgroup), - #[cfg(win)] - InputMask::Smb => &Id::HostBridge(AuthFormId::RemoteDirectory), - InputMask::AwsS3 => unreachable!("this shouldn't happen (password on s3)"), - InputMask::Kube => unreachable!("this shouldn't happen (password on kube)"), - InputMask::WebDAV => &Id::HostBridge(AuthFormId::RemoteDirectory), - }) - .is_ok()); + assert!( + self.app + .active(match self.host_bridge_input_mask() { + InputMask::Localhost => unreachable!(), + InputMask::Generic => &Id::HostBridge(AuthFormId::RemoteDirectory), + #[cfg(posix)] + InputMask::Smb => &Id::HostBridge(AuthFormId::SmbWorkgroup), + #[cfg(win)] + InputMask::Smb => &Id::HostBridge(AuthFormId::RemoteDirectory), + InputMask::AwsS3 => + unreachable!("this shouldn't happen (password on s3)"), + InputMask::Kube => + unreachable!("this shouldn't happen (password on kube)"), + InputMask::WebDAV => &Id::HostBridge(AuthFormId::RemoteDirectory), + }) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::PasswordBlurDown) => { - assert!(self - .app - .active(match self.remote_input_mask() { - InputMask::Localhost => unreachable!(), - InputMask::Generic => &Id::Remote(AuthFormId::RemoteDirectory), - #[cfg(posix)] - InputMask::Smb => &Id::Remote(AuthFormId::SmbWorkgroup), - #[cfg(win)] - InputMask::Smb => &Id::Remote(AuthFormId::RemoteDirectory), - InputMask::AwsS3 => unreachable!("this shouldn't happen (password on s3)"), - InputMask::Kube => unreachable!("this shouldn't happen (password on kube)"), - InputMask::WebDAV => &Id::Remote(AuthFormId::RemoteDirectory), - }) - .is_ok()); + assert!( + self.app + .active(match self.remote_input_mask() { + InputMask::Localhost => unreachable!(), + InputMask::Generic => &Id::Remote(AuthFormId::RemoteDirectory), + #[cfg(posix)] + InputMask::Smb => &Id::Remote(AuthFormId::SmbWorkgroup), + #[cfg(win)] + InputMask::Smb => &Id::Remote(AuthFormId::RemoteDirectory), + InputMask::AwsS3 => + unreachable!("this shouldn't happen (password on s3)"), + InputMask::Kube => + unreachable!("this shouldn't happen (password on kube)"), + InputMask::WebDAV => &Id::Remote(AuthFormId::RemoteDirectory), + }) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::PasswordBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::Username)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::Username)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::PasswordBlurUp) => { assert!(self.app.active(&Id::Remote(AuthFormId::Username)).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::PortBlurDown) => { - assert!(self - .app - .active(match self.host_bridge_input_mask() { - InputMask::Generic => &Id::HostBridge(AuthFormId::Username), - InputMask::Smb => &Id::HostBridge(AuthFormId::SmbShare), - InputMask::Localhost - | InputMask::AwsS3 - | InputMask::Kube - | InputMask::WebDAV => - unreachable!("this shouldn't happen (port on s3/kube/webdav)"), - }) - .is_ok()); + assert!( + self.app + .active(match self.host_bridge_input_mask() { + InputMask::Generic => &Id::HostBridge(AuthFormId::Username), + InputMask::Smb => &Id::HostBridge(AuthFormId::SmbShare), + InputMask::Localhost + | InputMask::AwsS3 + | InputMask::Kube + | InputMask::WebDAV => + unreachable!("this shouldn't happen (port on s3/kube/webdav)"), + }) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::PortBlurDown) => { - assert!(self - .app - .active(match self.remote_input_mask() { - InputMask::Generic => &Id::Remote(AuthFormId::Username), - InputMask::Smb => &Id::Remote(AuthFormId::SmbShare), - InputMask::Localhost - | InputMask::AwsS3 - | InputMask::Kube - | InputMask::WebDAV => - unreachable!("this shouldn't happen (port on s3/kube/webdav)"), - }) - .is_ok()); + assert!( + self.app + .active(match self.remote_input_mask() { + InputMask::Generic => &Id::Remote(AuthFormId::Username), + InputMask::Smb => &Id::Remote(AuthFormId::SmbShare), + InputMask::Localhost + | InputMask::AwsS3 + | InputMask::Kube + | InputMask::WebDAV => + unreachable!("this shouldn't happen (port on s3/kube/webdav)"), + }) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::PortBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::Address)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::Address)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::PortBlurUp) => { assert!(self.app.active(&Id::Remote(AuthFormId::Address)).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::ProtocolBlurDown) => { - assert!(self - .app - .active(match self.host_bridge_input_mask() { - InputMask::Localhost => &Id::HostBridge(AuthFormId::LocalDirectory), - InputMask::Generic => &Id::HostBridge(AuthFormId::Address), - InputMask::Smb => &Id::HostBridge(AuthFormId::Address), - InputMask::AwsS3 => &Id::HostBridge(AuthFormId::S3Bucket), - InputMask::Kube => &Id::HostBridge(AuthFormId::KubeNamespace), - InputMask::WebDAV => &Id::HostBridge(AuthFormId::WebDAVUri), - }) - .is_ok()); + assert!( + self.app + .active(match self.host_bridge_input_mask() { + InputMask::Localhost => &Id::HostBridge(AuthFormId::LocalDirectory), + InputMask::Generic => &Id::HostBridge(AuthFormId::Address), + InputMask::Smb => &Id::HostBridge(AuthFormId::Address), + InputMask::AwsS3 => &Id::HostBridge(AuthFormId::S3Bucket), + InputMask::Kube => &Id::HostBridge(AuthFormId::KubeNamespace), + InputMask::WebDAV => &Id::HostBridge(AuthFormId::WebDAVUri), + }) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::ProtocolBlurDown) => { - assert!(self - .app - .active(match self.remote_input_mask() { - InputMask::Localhost => &Id::Remote(AuthFormId::LocalDirectory), - InputMask::Generic => &Id::Remote(AuthFormId::Address), - InputMask::Smb => &Id::Remote(AuthFormId::Address), - InputMask::AwsS3 => &Id::Remote(AuthFormId::S3Bucket), - InputMask::Kube => &Id::Remote(AuthFormId::KubeNamespace), - InputMask::WebDAV => &Id::Remote(AuthFormId::WebDAVUri), - }) - .is_ok()); + assert!( + self.app + .active(match self.remote_input_mask() { + InputMask::Localhost => &Id::Remote(AuthFormId::LocalDirectory), + InputMask::Generic => &Id::Remote(AuthFormId::Address), + InputMask::Smb => &Id::Remote(AuthFormId::Address), + InputMask::AwsS3 => &Id::Remote(AuthFormId::S3Bucket), + InputMask::Kube => &Id::Remote(AuthFormId::KubeNamespace), + InputMask::WebDAV => &Id::Remote(AuthFormId::WebDAVUri), + }) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::ProtocolBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::LocalDirectory)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::LocalDirectory)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::ProtocolBlurUp) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::LocalDirectory)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::LocalDirectory)) + .is_ok() + ); } UiMsg::RececentsListBlur => { assert!(self.app.active(&Id::BookmarksList).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::RemoteDirectoryBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::LocalDirectory)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::LocalDirectory)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::RemoteDirectoryBlurDown) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::LocalDirectory)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::LocalDirectory)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::RemoteDirectoryBlurUp) => { - assert!(self - .app - .active(match self.host_bridge_input_mask() { - InputMask::Localhost => unreachable!(), - InputMask::Generic => &Id::HostBridge(AuthFormId::Password), - #[cfg(posix)] - InputMask::Smb => &Id::HostBridge(AuthFormId::SmbWorkgroup), - #[cfg(win)] - InputMask::Smb => &Id::HostBridge(AuthFormId::Password), - InputMask::Kube => &Id::HostBridge(AuthFormId::KubeClientKey), - InputMask::AwsS3 => &Id::HostBridge(AuthFormId::S3NewPathStyle), - InputMask::WebDAV => &Id::HostBridge(AuthFormId::Password), - }) - .is_ok()); + assert!( + self.app + .active(match self.host_bridge_input_mask() { + InputMask::Localhost => unreachable!(), + InputMask::Generic => &Id::HostBridge(AuthFormId::Password), + #[cfg(posix)] + InputMask::Smb => &Id::HostBridge(AuthFormId::SmbWorkgroup), + #[cfg(win)] + InputMask::Smb => &Id::HostBridge(AuthFormId::Password), + InputMask::Kube => &Id::HostBridge(AuthFormId::KubeClientKey), + InputMask::AwsS3 => &Id::HostBridge(AuthFormId::S3NewPathStyle), + InputMask::WebDAV => &Id::HostBridge(AuthFormId::Password), + }) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::RemoteDirectoryBlurUp) => { - assert!(self - .app - .active(match self.remote_input_mask() { - InputMask::Localhost => unreachable!(), - InputMask::Generic => &Id::Remote(AuthFormId::Password), - #[cfg(posix)] - InputMask::Smb => &Id::Remote(AuthFormId::SmbWorkgroup), - #[cfg(win)] - InputMask::Smb => &Id::Remote(AuthFormId::Password), - InputMask::Kube => &Id::Remote(AuthFormId::KubeClientKey), - InputMask::AwsS3 => &Id::Remote(AuthFormId::S3NewPathStyle), - InputMask::WebDAV => &Id::Remote(AuthFormId::Password), - }) - .is_ok()); + assert!( + self.app + .active(match self.remote_input_mask() { + InputMask::Localhost => unreachable!(), + InputMask::Generic => &Id::Remote(AuthFormId::Password), + #[cfg(posix)] + InputMask::Smb => &Id::Remote(AuthFormId::SmbWorkgroup), + #[cfg(win)] + InputMask::Smb => &Id::Remote(AuthFormId::Password), + InputMask::Kube => &Id::Remote(AuthFormId::KubeClientKey), + InputMask::AwsS3 => &Id::Remote(AuthFormId::S3NewPathStyle), + InputMask::WebDAV => &Id::Remote(AuthFormId::Password), + }) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::S3BucketBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3Region)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3Region)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3BucketBlurDown) => { assert!(self.app.active(&Id::Remote(AuthFormId::S3Region)).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::S3BucketBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::Protocol)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::Protocol)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3BucketBlurUp) => { assert!(self.app.active(&Id::Remote(AuthFormId::Protocol)).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::S3RegionBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3Endpoint)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3Endpoint)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3RegionBlurDown) => { assert!(self.app.active(&Id::Remote(AuthFormId::S3Endpoint)).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::S3RegionBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3Bucket)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3Bucket)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3RegionBlurUp) => { assert!(self.app.active(&Id::Remote(AuthFormId::S3Bucket)).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::S3EndpointBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3Profile)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3Profile)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3EndpointBlurDown) => { assert!(self.app.active(&Id::Remote(AuthFormId::S3Profile)).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::S3EndpointBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3Region)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3Region)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3EndpointBlurUp) => { assert!(self.app.active(&Id::Remote(AuthFormId::S3Region)).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::S3ProfileBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3AccessKey)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3AccessKey)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3ProfileBlurDown) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::S3AccessKey)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::S3AccessKey)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::S3ProfileBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3Endpoint)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3Endpoint)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3ProfileBlurUp) => { assert!(self.app.active(&Id::Remote(AuthFormId::S3Endpoint)).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::S3AccessKeyBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3SecretAccessKey)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3SecretAccessKey)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3AccessKeyBlurDown) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::S3SecretAccessKey)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::S3SecretAccessKey)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::S3AccessKeyBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3Profile)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3Profile)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3AccessKeyBlurUp) => { assert!(self.app.active(&Id::Remote(AuthFormId::S3Profile)).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::S3SecretAccessKeyBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3SecurityToken)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3SecurityToken)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3SecretAccessKeyBlurDown) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::S3SecurityToken)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::S3SecurityToken)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::S3SecretAccessKeyBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3AccessKey)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3AccessKey)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3SecretAccessKeyBlurUp) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::S3AccessKey)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::S3AccessKey)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::S3SecurityTokenBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3SessionToken)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3SessionToken)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3SecurityTokenBlurDown) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::S3SessionToken)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::S3SessionToken)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::S3SecurityTokenBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3SecretAccessKey)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3SecretAccessKey)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3SecurityTokenBlurUp) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::S3SecretAccessKey)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::S3SecretAccessKey)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::S3SessionTokenBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3NewPathStyle)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3NewPathStyle)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3SessionTokenBlurDown) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::S3NewPathStyle)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::S3NewPathStyle)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::S3SessionTokenBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3SecurityToken)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3SecurityToken)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3SessionTokenBlurUp) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::S3SecurityToken)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::S3SecurityToken)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::S3NewPathStyleBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::RemoteDirectory)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::RemoteDirectory)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3NewPathStyleBlurDown) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::RemoteDirectory)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::RemoteDirectory)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::S3NewPathStyleBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::S3SessionToken)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::S3SessionToken)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::S3NewPathStyleBlurUp) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::S3SessionToken)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::S3SessionToken)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::KubeClientCertBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::KubeClientKey)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::KubeClientKey)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::KubeClientCertBlurDown) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::KubeClientKey)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::KubeClientKey)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::KubeClientCertBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::KubeUsername)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::KubeUsername)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::KubeClientCertBlurUp) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::KubeUsername)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::KubeUsername)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::KubeClientKeyBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::RemoteDirectory)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::RemoteDirectory)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::KubeClientKeyBlurDown) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::RemoteDirectory)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::RemoteDirectory)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::KubeClientKeyBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::KubeClientCert)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::KubeClientCert)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::KubeClientKeyBlurUp) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::KubeClientCert)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::KubeClientCert)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::KubeNamespaceBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::KubeClusterUrl)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::KubeClusterUrl)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::KubeNamespaceBlurDown) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::KubeClusterUrl)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::KubeClusterUrl)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::KubeNamespaceBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::Protocol)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::Protocol)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::KubeNamespaceBlurUp) => { assert!(self.app.active(&Id::Remote(AuthFormId::Protocol)).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::KubeClusterUrlBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::KubeUsername)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::KubeUsername)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::KubeClusterUrlBlurDown) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::KubeUsername)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::KubeUsername)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::KubeClusterUrlBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::KubeNamespace)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::KubeNamespace)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::KubeClusterUrlBlurUp) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::KubeNamespace)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::KubeNamespace)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::KubeUsernameBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::KubeClientCert)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::KubeClientCert)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::KubeUsernameBlurDown) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::KubeClientCert)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::KubeClientCert)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::KubeUsernameBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::KubeClusterUrl)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::KubeClusterUrl)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::KubeUsernameBlurUp) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::KubeClusterUrl)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::KubeClusterUrl)) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::SmbShareBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::Username)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::Username)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::SmbShareBlurDown) => { assert!(self.app.active(&Id::Remote(AuthFormId::Username)).is_ok()); @@ -762,24 +834,27 @@ impl AuthActivity { } #[cfg(posix)] UiMsg::HostBridge(UiAuthFormMsg::SmbWorkgroupDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::RemoteDirectory)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::RemoteDirectory)) + .is_ok() + ); } #[cfg(posix)] UiMsg::Remote(UiAuthFormMsg::SmbWorkgroupDown) => { - assert!(self - .app - .active(&Id::Remote(AuthFormId::RemoteDirectory)) - .is_ok()); + assert!( + self.app + .active(&Id::Remote(AuthFormId::RemoteDirectory)) + .is_ok() + ); } #[cfg(posix)] UiMsg::HostBridge(UiAuthFormMsg::SmbWorkgroupUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::Password)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::Password)) + .is_ok() + ); } #[cfg(posix)] UiMsg::Remote(UiAuthFormMsg::SmbWorkgroupUp) => { @@ -807,54 +882,63 @@ impl AuthActivity { self.mount_bookmark_save_dialog(self.get_current_form_tab()); } UiMsg::HostBridge(UiAuthFormMsg::UsernameBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::Password)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::Password)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::UsernameBlurDown) => { assert!(self.app.active(&Id::Remote(AuthFormId::Password)).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::UsernameBlurUp) => { - assert!(self - .app - .active(match self.host_bridge_input_mask() { - InputMask::Localhost => unreachable!(), - InputMask::Generic => &Id::HostBridge(AuthFormId::Port), - InputMask::Smb => &Id::HostBridge(AuthFormId::SmbShare), - InputMask::Kube => unreachable!("this shouldn't happen (username on kube)"), - InputMask::AwsS3 => unreachable!("this shouldn't happen (username on s3)"), - InputMask::WebDAV => &Id::HostBridge(AuthFormId::WebDAVUri), - }) - .is_ok()); + assert!( + self.app + .active(match self.host_bridge_input_mask() { + InputMask::Localhost => unreachable!(), + InputMask::Generic => &Id::HostBridge(AuthFormId::Port), + InputMask::Smb => &Id::HostBridge(AuthFormId::SmbShare), + InputMask::Kube => + unreachable!("this shouldn't happen (username on kube)"), + InputMask::AwsS3 => + unreachable!("this shouldn't happen (username on s3)"), + InputMask::WebDAV => &Id::HostBridge(AuthFormId::WebDAVUri), + }) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::UsernameBlurUp) => { - assert!(self - .app - .active(match self.remote_input_mask() { - InputMask::Localhost => unreachable!(), - InputMask::Generic => &Id::Remote(AuthFormId::Port), - InputMask::Smb => &Id::Remote(AuthFormId::SmbShare), - InputMask::Kube => unreachable!("this shouldn't happen (username on kube)"), - InputMask::AwsS3 => unreachable!("this shouldn't happen (username on s3)"), - InputMask::WebDAV => &Id::Remote(AuthFormId::WebDAVUri), - }) - .is_ok()); + assert!( + self.app + .active(match self.remote_input_mask() { + InputMask::Localhost => unreachable!(), + InputMask::Generic => &Id::Remote(AuthFormId::Port), + InputMask::Smb => &Id::Remote(AuthFormId::SmbShare), + InputMask::Kube => + unreachable!("this shouldn't happen (username on kube)"), + InputMask::AwsS3 => + unreachable!("this shouldn't happen (username on s3)"), + InputMask::WebDAV => &Id::Remote(AuthFormId::WebDAVUri), + }) + .is_ok() + ); } UiMsg::HostBridge(UiAuthFormMsg::WebDAVUriBlurDown) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::Username)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::Username)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::WebDAVUriBlurDown) => { assert!(self.app.active(&Id::Remote(AuthFormId::Username)).is_ok()); } UiMsg::HostBridge(UiAuthFormMsg::WebDAVUriBlurUp) => { - assert!(self - .app - .active(&Id::HostBridge(AuthFormId::Protocol)) - .is_ok()); + assert!( + self.app + .active(&Id::HostBridge(AuthFormId::Protocol)) + .is_ok() + ); } UiMsg::Remote(UiAuthFormMsg::WebDAVUriBlurUp) => { assert!(self.app.active(&Id::Remote(AuthFormId::Protocol)).is_ok()); diff --git a/src/ui/activities/auth/view.rs b/src/ui/activities/auth/view.rs index df19e6f..70e2ffd 100644 --- a/src/ui/activities/auth/view.rs +++ b/src/ui/activities/auth/view.rs @@ -12,14 +12,14 @@ use tuirealm::ratatui::widgets::Clear; use tuirealm::{State, StateValue, Sub, SubClause, SubEventClause}; use super::{ - components, AuthActivity, AuthFormId, Context, FileTransferProtocol, FormTab, - HostBridgeProtocol, Id, InputMask, + AuthActivity, AuthFormId, Context, FileTransferProtocol, FormTab, HostBridgeProtocol, Id, + InputMask, components, }; +use crate::filetransfer::FileTransferParams; use crate::filetransfer::params::{ AwsS3Params, GenericProtocolParams, KubeProtocolParams, ProtocolParams, SmbParams, WebDAVProtocolParams, }; -use crate::filetransfer::FileTransferParams; use crate::utils::ui::{Popup, Size}; impl AuthActivity { @@ -28,23 +28,26 @@ impl AuthActivity { let key_color = self.theme().misc_keys; let info_color = self.theme().misc_info_dialog; // Headers - assert!(self - .app - .mount(Id::Title, Box::::default(), vec![]) - .is_ok()); - assert!(self - .app - .mount(Id::Subtitle, Box::::default(), vec![]) - .is_ok()); + assert!( + self.app + .mount(Id::Title, Box::::default(), vec![]) + .is_ok() + ); + assert!( + self.app + .mount(Id::Subtitle, Box::::default(), vec![]) + .is_ok() + ); // Footer - assert!(self - .app - .mount( - Id::HelpFooter, - Box::new(components::HelpFooter::new(key_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .mount( + Id::HelpFooter, + Box::new(components::HelpFooter::new(key_color)), + vec![] + ) + .is_ok() + ); // Host bridge auth form self.mount_host_bridge_protocol(HostBridgeProtocol::Localhost); @@ -113,17 +116,18 @@ impl AuthActivity { .get_string(super::STORE_KEY_LATEST_VERSION) { let version: String = version.to_string(); - assert!(self - .app - .mount( - Id::NewVersionDisclaimer, - Box::new(components::NewVersionDisclaimer::new( - version.as_str(), - info_color - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .mount( + Id::NewVersionDisclaimer, + Box::new(components::NewVersionDisclaimer::new( + version.as_str(), + info_color + )), + vec![] + ) + .is_ok() + ); } // Load bookmarks self.view_bookmarks(); @@ -455,14 +459,15 @@ impl AuthActivity { }) .collect(); let bookmarks_color = self.theme().auth_bookmarks; - assert!(self - .app - .remount( - Id::BookmarksList, - Box::new(components::BookmarksList::new(&bookmarks, bookmarks_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::BookmarksList, + Box::new(components::BookmarksList::new(&bookmarks, bookmarks_color)), + vec![] + ) + .is_ok() + ); } /// View recent connections @@ -473,14 +478,15 @@ impl AuthActivity { .map(|x| Self::fmt_recent(self.bookmarks_client().unwrap().get_recent(x).unwrap())) .collect(); let recents_color = self.theme().auth_recents; - assert!(self - .app - .remount( - Id::RecentsList, - Box::new(components::RecentsList::new(&bookmarks, recents_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::RecentsList, + Box::new(components::RecentsList::new(&bookmarks, recents_color)), + vec![] + ) + .is_ok() + ); } // -- mount @@ -488,14 +494,15 @@ impl AuthActivity { /// Mount error box pub(super) fn mount_error>(&mut self, text: S) { let err_color = self.theme().misc_error_dialog; - assert!(self - .app - .remount( - Id::ErrorPopup, - Box::new(components::ErrorPopup::new(text, err_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::ErrorPopup, + Box::new(components::ErrorPopup::new(text, err_color)), + vec![] + ) + .is_ok() + ); assert!(self.app.active(&Id::ErrorPopup).is_ok()); } @@ -507,14 +514,15 @@ impl AuthActivity { /// Mount info box pub(super) fn mount_info>(&mut self, text: S) { let color = self.theme().misc_info_dialog; - assert!(self - .app - .remount( - Id::InfoPopup, - Box::new(components::InfoPopup::new(text, color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::InfoPopup, + Box::new(components::InfoPopup::new(text, color)), + vec![] + ) + .is_ok() + ); assert!(self.app.active(&Id::InfoPopup).is_ok()); } @@ -526,14 +534,15 @@ impl AuthActivity { /// Mount wait box pub(super) fn mount_wait(&mut self, text: &str) { let wait_color = self.theme().misc_info_dialog; - assert!(self - .app - .remount( - Id::WaitPopup, - Box::new(components::WaitPopup::new(text, wait_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::WaitPopup, + Box::new(components::WaitPopup::new(text, wait_color)), + vec![] + ) + .is_ok() + ); assert!(self.app.active(&Id::WaitPopup).is_ok()); } @@ -545,14 +554,15 @@ impl AuthActivity { /// Mount size error pub(super) fn mount_size_err(&mut self) { // Mount - assert!(self - .app - .remount( - Id::WindowSizeError, - Box::new(components::WindowSizeError::new(Color::Red)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::WindowSizeError, + Box::new(components::WindowSizeError::new(Color::Red)), + vec![] + ) + .is_ok() + ); assert!(self.app.active(&Id::WindowSizeError).is_ok()); } @@ -565,14 +575,15 @@ impl AuthActivity { pub(super) fn mount_quit(&mut self) { // Protocol let quit_color = self.theme().misc_quit_dialog; - assert!(self - .app - .remount( - Id::QuitPopup, - Box::new(components::QuitPopup::new(quit_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::QuitPopup, + Box::new(components::QuitPopup::new(quit_color)), + vec![] + ) + .is_ok() + ); assert!(self.app.active(&Id::QuitPopup).is_ok()); } @@ -584,14 +595,15 @@ impl AuthActivity { /// Mount bookmark delete dialog pub(super) fn mount_bookmark_del_dialog(&mut self) { let warn_color = self.theme().misc_warn_dialog; - assert!(self - .app - .remount( - Id::DeleteBookmarkPopup, - Box::new(components::DeleteBookmarkPopup::new(warn_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::DeleteBookmarkPopup, + Box::new(components::DeleteBookmarkPopup::new(warn_color)), + vec![] + ) + .is_ok() + ); assert!(self.app.active(&Id::DeleteBookmarkPopup).is_ok()); } @@ -603,14 +615,15 @@ impl AuthActivity { /// Mount recent delete dialog pub(super) fn mount_recent_del_dialog(&mut self) { let warn_color = self.theme().misc_warn_dialog; - assert!(self - .app - .remount( - Id::DeleteRecentPopup, - Box::new(components::DeleteRecentPopup::new(warn_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::DeleteRecentPopup, + Box::new(components::DeleteRecentPopup::new(warn_color)), + vec![] + ) + .is_ok() + ); assert!(self.app.active(&Id::DeleteRecentPopup).is_ok()); } @@ -623,22 +636,24 @@ impl AuthActivity { pub(super) fn mount_bookmark_save_dialog(&mut self, form_tab: FormTab) { let save_color = self.theme().misc_save_dialog; let warn_color = self.theme().misc_warn_dialog; - assert!(self - .app - .remount( - Id::BookmarkName, - Box::new(components::BookmarkName::new(form_tab, save_color)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::BookmarkSavePassword, - Box::new(components::BookmarkSavePassword::new(form_tab, warn_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::BookmarkName, + Box::new(components::BookmarkName::new(form_tab, save_color)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::BookmarkSavePassword, + Box::new(components::BookmarkSavePassword::new(form_tab, warn_color)), + vec![] + ) + .is_ok() + ); // Give focus to input bookmark name assert!(self.app.active(&Id::BookmarkName).is_ok()); } @@ -652,14 +667,15 @@ impl AuthActivity { /// Mount keybindings pub(super) fn mount_keybindings(&mut self) { let key_color = self.theme().misc_keys; - assert!(self - .app - .remount( - Id::Keybindings, - Box::new(components::Keybindings::new(key_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Keybindings, + Box::new(components::Keybindings::new(key_color)), + vec![] + ) + .is_ok() + ); // Active help assert!(self.app.active(&Id::Keybindings).is_ok()); } @@ -675,22 +691,24 @@ impl AuthActivity { if let Some(release_notes) = ctx.store().get_string(super::STORE_KEY_RELEASE_NOTES) { // make spans let info_color = self.theme().misc_info_dialog; - assert!(self - .app - .remount( - Id::NewVersionChangelog, - Box::new(components::ReleaseNotes::new(release_notes, info_color)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::InstallUpdatePopup, - Box::new(components::InstallUpdatePopup::new(info_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::NewVersionChangelog, + Box::new(components::ReleaseNotes::new(release_notes, info_color)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::InstallUpdatePopup, + Box::new(components::InstallUpdatePopup::new(info_color)), + vec![] + ) + .is_ok() + ); assert!(self.app.active(&Id::InstallUpdatePopup).is_ok()); } } @@ -704,32 +722,34 @@ impl AuthActivity { pub(super) fn mount_host_bridge_protocol(&mut self, protocol: HostBridgeProtocol) { let protocol_color = self.theme().auth_protocol; - assert!(self - .app - .remount( - Id::HostBridge(AuthFormId::Protocol), - Box::new(components::HostBridgeProtocolRadio::new( - protocol, - protocol_color - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::HostBridge(AuthFormId::Protocol), + Box::new(components::HostBridgeProtocolRadio::new( + protocol, + protocol_color + )), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_remote_protocol(&mut self, protocol: FileTransferProtocol) { let protocol_color = self.theme().auth_protocol; - assert!(self - .app - .remount( - Id::Remote(AuthFormId::Protocol), - Box::new(components::RemoteProtocolRadio::new( - protocol, - protocol_color - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Remote(AuthFormId::Protocol), + Box::new(components::RemoteProtocolRadio::new( + protocol, + protocol_color + )), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_remote_directory>( @@ -739,18 +759,19 @@ impl AuthActivity { ) { let id = Self::form_tab_id(form_tab, AuthFormId::RemoteDirectory); let protocol_color = self.theme().auth_protocol; - assert!(self - .app - .remount( - id, - Box::new(components::InputRemoteDirectory::new( - remote_path.as_ref(), - form_tab, - protocol_color - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputRemoteDirectory::new( + remote_path.as_ref(), + form_tab, + protocol_color + )), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_local_directory>( @@ -760,315 +781,337 @@ impl AuthActivity { ) { let id = Self::form_tab_id(form_tab, AuthFormId::LocalDirectory); let color = self.theme().auth_username; - assert!(self - .app - .remount( - id, - Box::new(components::InputLocalDirectory::new( - local_path.as_ref(), - form_tab, - color - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputLocalDirectory::new( + local_path.as_ref(), + form_tab, + color + )), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_address(&mut self, form_tab: FormTab, address: &str) { let addr_color = self.theme().auth_address; let id = Self::form_tab_id(form_tab, AuthFormId::Address); - assert!(self - .app - .remount( - id, - Box::new(components::InputAddress::new(address, form_tab, addr_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputAddress::new(address, form_tab, addr_color)), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_port(&mut self, form_tab: FormTab, port: u16) { let port_color = self.theme().auth_port; let id = Self::form_tab_id(form_tab, AuthFormId::Port); - assert!(self - .app - .remount( - id, - Box::new(components::InputPort::new(port, form_tab, port_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputPort::new(port, form_tab, port_color)), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_username(&mut self, form_tab: FormTab, username: &str) { let username_color = self.theme().auth_username; let id = Self::form_tab_id(form_tab, AuthFormId::Username); - assert!(self - .app - .remount( - id, - Box::new(components::InputUsername::new( - username, - form_tab, - username_color - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputUsername::new( + username, + form_tab, + username_color + )), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_password(&mut self, form_tab: FormTab, password: &str) { let password_color = self.theme().auth_password; let id = Self::form_tab_id(form_tab, AuthFormId::Password); - assert!(self - .app - .remount( - id, - Box::new(components::InputPassword::new( - password, - form_tab, - password_color - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputPassword::new( + password, + form_tab, + password_color + )), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_s3_bucket(&mut self, form_tab: FormTab, bucket: &str) { let addr_color = self.theme().auth_address; let id = Self::form_tab_id(form_tab, AuthFormId::S3Bucket); - assert!(self - .app - .remount( - id, - Box::new(components::InputS3Bucket::new(bucket, form_tab, addr_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputS3Bucket::new(bucket, form_tab, addr_color)), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_s3_region(&mut self, form_tab: FormTab, region: &str) { let port_color = self.theme().auth_port; let id = Self::form_tab_id(form_tab, AuthFormId::S3Region); - assert!(self - .app - .remount( - id, - Box::new(components::InputS3Region::new(region, form_tab, port_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputS3Region::new(region, form_tab, port_color)), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_s3_endpoint(&mut self, form_tab: FormTab, endpoint: &str) { let username_color = self.theme().auth_username; let id = Self::form_tab_id(form_tab, AuthFormId::S3Endpoint); - assert!(self - .app - .remount( - id, - Box::new(components::InputS3Endpoint::new( - endpoint, - form_tab, - username_color - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputS3Endpoint::new( + endpoint, + form_tab, + username_color + )), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_s3_profile(&mut self, form_tab: FormTab, profile: &str) { let color = self.theme().auth_password; let id = Self::form_tab_id(form_tab, AuthFormId::S3Profile); - assert!(self - .app - .remount( - id, - Box::new(components::InputS3Profile::new(profile, form_tab, color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputS3Profile::new(profile, form_tab, color)), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_s3_access_key(&mut self, form_tab: FormTab, key: &str) { let color = self.theme().auth_address; let id = Self::form_tab_id(form_tab, AuthFormId::S3AccessKey); - assert!(self - .app - .remount( - id, - Box::new(components::InputS3AccessKey::new(key, form_tab, color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputS3AccessKey::new(key, form_tab, color)), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_s3_secret_access_key(&mut self, form_tab: FormTab, key: &str) { let color = self.theme().auth_port; let id = Self::form_tab_id(form_tab, AuthFormId::S3SecretAccessKey); - assert!(self - .app - .remount( - id, - Box::new(components::InputS3SecretAccessKey::new( - key, form_tab, color - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputS3SecretAccessKey::new( + key, form_tab, color + )), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_s3_security_token(&mut self, form_tab: FormTab, token: &str) { let color = self.theme().auth_username; let id = Self::form_tab_id(form_tab, AuthFormId::S3SecurityToken); - assert!(self - .app - .remount( - id, - Box::new(components::InputS3SecurityToken::new( - token, form_tab, color - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputS3SecurityToken::new( + token, form_tab, color + )), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_s3_session_token(&mut self, form_tab: FormTab, token: &str) { let color = self.theme().auth_password; let id = Self::form_tab_id(form_tab, AuthFormId::S3SessionToken); - assert!(self - .app - .remount( - id, - Box::new(components::InputS3SessionToken::new(token, form_tab, color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputS3SessionToken::new(token, form_tab, color)), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_s3_new_path_style(&mut self, form_tab: FormTab, new_path_style: bool) { let color = self.theme().auth_address; let id = Self::form_tab_id(form_tab, AuthFormId::S3NewPathStyle); - assert!(self - .app - .remount( - id, - Box::new(components::RadioS3NewPathStyle::new( - new_path_style, - form_tab, - color - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::RadioS3NewPathStyle::new( + new_path_style, + form_tab, + color + )), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_kube_namespace(&mut self, form_tab: FormTab, value: &str) { let color = self.theme().auth_port; let id = Self::form_tab_id(form_tab, AuthFormId::KubeNamespace); - assert!(self - .app - .remount( - id, - Box::new(components::InputKubeNamespace::new(value, form_tab, color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputKubeNamespace::new(value, form_tab, color)), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_kube_cluster_url(&mut self, form_tab: FormTab, value: &str) { let color = self.theme().auth_username; let id = Self::form_tab_id(form_tab, AuthFormId::KubeClusterUrl); - assert!(self - .app - .remount( - id, - Box::new(components::InputKubeClusterUrl::new(value, form_tab, color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputKubeClusterUrl::new(value, form_tab, color)), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_kube_username(&mut self, form_tab: FormTab, value: &str) { let color = self.theme().auth_password; let id = Self::form_tab_id(form_tab, AuthFormId::KubeUsername); - assert!(self - .app - .remount( - id, - Box::new(components::InputKubeUsername::new(value, form_tab, color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputKubeUsername::new(value, form_tab, color)), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_kube_client_cert(&mut self, form_tab: FormTab, value: &str) { let color = self.theme().auth_address; let id = Self::form_tab_id(form_tab, AuthFormId::KubeClientCert); - assert!(self - .app - .remount( - id, - Box::new(components::InputKubeClientCert::new(value, form_tab, color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputKubeClientCert::new(value, form_tab, color)), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_kube_client_key(&mut self, form_tab: FormTab, value: &str) { let color = self.theme().auth_port; let id = Self::form_tab_id(form_tab, AuthFormId::KubeClientKey); - assert!(self - .app - .remount( - id, - Box::new(components::InputKubeClientKey::new(value, form_tab, color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputKubeClientKey::new(value, form_tab, color)), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_smb_share(&mut self, form_tab: FormTab, share: &str) { let color = self.theme().auth_password; let id = Self::form_tab_id(form_tab, AuthFormId::SmbShare); - assert!(self - .app - .remount( - id, - Box::new(components::InputSmbShare::new(share, form_tab, color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputSmbShare::new(share, form_tab, color)), + vec![] + ) + .is_ok() + ); } #[cfg(posix)] pub(super) fn mount_smb_workgroup(&mut self, form_tab: FormTab, workgroup: &str) { let color = self.theme().auth_address; let id = Self::form_tab_id(form_tab, AuthFormId::SmbWorkgroup); - assert!(self - .app - .remount( - id, - Box::new(components::InputSmbWorkgroup::new( - workgroup, form_tab, color - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputSmbWorkgroup::new( + workgroup, form_tab, color + )), + vec![] + ) + .is_ok() + ); } pub(super) fn mount_webdav_uri(&mut self, form_tab: FormTab, uri: &str) { let addr_color = self.theme().auth_address; let id = Self::form_tab_id(form_tab, AuthFormId::WebDAVUri); - assert!(self - .app - .remount( - id, - Box::new(components::InputWebDAVUri::new(uri, form_tab, addr_color)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + id, + Box::new(components::InputWebDAVUri::new(uri, form_tab, addr_color)), + vec![] + ) + .is_ok() + ); } fn form_tab_id(form_tab: FormTab, id: AuthFormId) -> Id { @@ -1949,65 +1992,66 @@ impl AuthActivity { fn init_global_listener(&mut self) { use tuirealm::event::{Key, KeyEvent, KeyModifiers}; - assert!(self - .app - .mount( - Id::GlobalListener, - Box::::default(), - vec![ - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Esc, - modifiers: KeyModifiers::NONE, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Function(10), - modifiers: KeyModifiers::NONE, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Char('c'), - modifiers: KeyModifiers::CONTROL, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Char('h'), - modifiers: KeyModifiers::CONTROL, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Function(1), - modifiers: KeyModifiers::NONE, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Char('r'), - modifiers: KeyModifiers::CONTROL, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Char('s'), - modifiers: KeyModifiers::CONTROL, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new(SubEventClause::WindowResize, SubClause::Always) - ] - ) - .is_ok()); + assert!( + self.app + .mount( + Id::GlobalListener, + Box::::default(), + vec![ + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Esc, + modifiers: KeyModifiers::NONE, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Function(10), + modifiers: KeyModifiers::NONE, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Char('c'), + modifiers: KeyModifiers::CONTROL, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Char('h'), + modifiers: KeyModifiers::CONTROL, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Function(1), + modifiers: KeyModifiers::NONE, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Char('r'), + modifiers: KeyModifiers::CONTROL, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Char('s'), + modifiers: KeyModifiers::CONTROL, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new(SubEventClause::WindowResize, SubClause::Always) + ] + ) + .is_ok() + ); } pub(super) fn get_current_form_tab(&self) -> FormTab { diff --git a/src/ui/activities/filetransfer/actions/change_dir.rs b/src/ui/activities/filetransfer/actions/change_dir.rs index db5c5a5..3cd091b 100644 --- a/src/ui/activities/filetransfer/actions/change_dir.rs +++ b/src/ui/activities/filetransfer/actions/change_dir.rs @@ -167,7 +167,9 @@ impl FileTransferActivity { } } else { // Do not synchronize, disable sync browsing and return - trace!("The user doesn't want to create the directory; disabling synchronized browsing"); + trace!( + "The user doesn't want to create the directory; disabling synchronized browsing" + ); self.log( LogLevel::Warn, format!("Refused to create '{name}'; synchronized browsing disabled"), diff --git a/src/ui/activities/filetransfer/actions/edit.rs b/src/ui/activities/filetransfer/actions/edit.rs index b93d909..89056a9 100644 --- a/src/ui/activities/filetransfer/actions/edit.rs +++ b/src/ui/activities/filetransfer/actions/edit.rs @@ -7,8 +7,8 @@ use std::io::Read; use std::path::{Path, PathBuf}; use std::time::SystemTime; -use remotefs::fs::Metadata; use remotefs::File; +use remotefs::fs::Metadata; use super::{FileTransferActivity, LogLevel, SelectedFile, TransferPayload}; @@ -221,10 +221,7 @@ impl FileTransferActivity { /// Edit file on remote host fn edit_remote_file(&mut self, file: File) -> Result<(), String> { // Create temp file - let tmpfile: PathBuf = match self.download_file_as_temp(&file) { - Ok(p) => p, - Err(err) => return Err(err), - }; + let tmpfile = self.download_file_as_temp(&file)?; // Download file let file_name = file.name(); let file_path = file.path().to_path_buf(); @@ -243,7 +240,7 @@ impl FileTransferActivity { "Could not stat \"{}\": {}", tmpfile.as_path().display(), err - )) + )); } }; // Edit file @@ -256,7 +253,7 @@ impl FileTransferActivity { "Could not stat \"{}\": {}", tmpfile.as_path().display(), err - )) + )); } }; // Check if file has changed @@ -282,7 +279,7 @@ impl FileTransferActivity { "Could not stat \"{}\": {}", tmpfile.as_path().display(), err - )) + )); } }; // Send file diff --git a/src/ui/activities/filetransfer/actions/filter.rs b/src/ui/activities/filetransfer/actions/filter.rs index 7d41523..ef97a1b 100644 --- a/src/ui/activities/filetransfer/actions/filter.rs +++ b/src/ui/activities/filetransfer/actions/filter.rs @@ -4,8 +4,8 @@ use regex::Regex; use remotefs::File; use wildmatch::WildMatch; -use crate::ui::activities::filetransfer::lib::browser::FileExplorerTab; use crate::ui::activities::filetransfer::FileTransferActivity; +use crate::ui::activities::filetransfer::lib::browser::FileExplorerTab; #[derive(Clone, Debug)] pub enum Filter { diff --git a/src/ui/activities/filetransfer/actions/mod.rs b/src/ui/activities/filetransfer/actions/mod.rs index ba15c04..fc10cb4 100644 --- a/src/ui/activities/filetransfer/actions/mod.rs +++ b/src/ui/activities/filetransfer/actions/mod.rs @@ -2,8 +2,8 @@ //! //! `filetransfer_activiy` is the module which implements the Filetransfer activity, which is the main activity afterall -use remotefs::fs::UnixPex; use remotefs::File; +use remotefs::fs::UnixPex; use tuirealm::{State, StateValue}; use super::browser::FileExplorerTab; diff --git a/src/ui/activities/filetransfer/components/mod.rs b/src/ui/activities/filetransfer/components/mod.rs index 8d1dff9..4076ab2 100644 --- a/src/ui/activities/filetransfer/components/mod.rs +++ b/src/ui/activities/filetransfer/components/mod.rs @@ -16,12 +16,12 @@ mod transfer; pub use misc::FooterBar; pub use popups::{ - ChmodPopup, CopyPopup, DeletePopup, DisconnectPopup, ErrorPopup, ExecPopup, FatalPopup, - FileInfoPopup, FilterPopup, GotoPopup, KeybindingsPopup, MkdirPopup, NewfilePopup, + ATTR_FILES, ChmodPopup, CopyPopup, DeletePopup, DisconnectPopup, ErrorPopup, ExecPopup, + FatalPopup, FileInfoPopup, FilterPopup, GotoPopup, KeybindingsPopup, MkdirPopup, NewfilePopup, OpenWithPopup, ProgressBarFull, ProgressBarPartial, QuitPopup, RenamePopup, ReplacePopup, ReplacingFilesListPopup, SaveAsPopup, SortingPopup, StatusBarLocal, StatusBarRemote, SymlinkPopup, SyncBrowsingMkdirPopup, WaitPopup, WalkdirWaitPopup, WatchedPathsList, - WatcherPopup, ATTR_FILES, + WatcherPopup, }; pub use transfer::{ExplorerFind, ExplorerFuzzy, ExplorerLocal, ExplorerRemote}; diff --git a/src/ui/activities/filetransfer/components/popups.rs b/src/ui/activities/filetransfer/components/popups.rs index 76e36f8..32e5ee5 100644 --- a/src/ui/activities/filetransfer/components/popups.rs +++ b/src/ui/activities/filetransfer/components/popups.rs @@ -20,7 +20,7 @@ use tuirealm::{Component, Event, MockComponent, NoUserEvent, State, StateValue}; use uzers::{get_group_by_gid, get_user_by_uid}; pub use self::chmod::ChmodPopup; -pub use self::goto::{GotoPopup, ATTR_FILES}; +pub use self::goto::{ATTR_FILES, GotoPopup}; use super::super::Browser; use super::{Msg, PendingActionMsg, TransferMsg, UiMsg}; use crate::explorer::FileSorting; diff --git a/src/ui/activities/filetransfer/misc.rs b/src/ui/activities/filetransfer/misc.rs index 70ffb32..ec66fac 100644 --- a/src/ui/activities/filetransfer/misc.rs +++ b/src/ui/activities/filetransfer/misc.rs @@ -90,7 +90,9 @@ impl FileTransferActivity { /// Set text editor to use pub(super) fn setup_text_editor(&self) { - env::set_var("EDITOR", self.config().get_text_editor()); + unsafe { + env::set_var("EDITOR", self.config().get_text_editor()); + } } /// Convert a path to absolute according to host explorer @@ -262,22 +264,24 @@ impl FileTransferActivity { .map(|x| vec![TextSpan::from(self.host_bridge().fmt_file(x))]) .collect(); // Update content and title - assert!(self - .app - .attr( - &Id::ExplorerHostBridge, - Attribute::Content, - AttrValue::Table(files) - ) - .is_ok()); - assert!(self - .app - .attr( - &Id::ExplorerHostBridge, - Attribute::Title, - AttrValue::Title((hostname, Alignment::Left)) - ) - .is_ok()); + assert!( + self.app + .attr( + &Id::ExplorerHostBridge, + Attribute::Content, + AttrValue::Table(files) + ) + .is_ok() + ); + assert!( + self.app + .attr( + &Id::ExplorerHostBridge, + Attribute::Title, + AttrValue::Title((hostname, Alignment::Left)) + ) + .is_ok() + ); } /// Update remote file list @@ -307,22 +311,24 @@ impl FileTransferActivity { .map(|x| vec![TextSpan::from(self.remote().fmt_file(x))]) .collect(); // Update content and title - assert!(self - .app - .attr( - &Id::ExplorerRemote, - Attribute::Content, - AttrValue::Table(files) - ) - .is_ok()); - assert!(self - .app - .attr( - &Id::ExplorerRemote, - Attribute::Title, - AttrValue::Title((hostname, Alignment::Left)) - ) - .is_ok()); + assert!( + self.app + .attr( + &Id::ExplorerRemote, + Attribute::Content, + AttrValue::Table(files) + ) + .is_ok() + ); + assert!( + self.app + .attr( + &Id::ExplorerRemote, + Attribute::Title, + AttrValue::Title((hostname, Alignment::Left)) + ) + .is_ok() + ); } /// Update log box @@ -361,61 +367,67 @@ impl FileTransferActivity { .add_col(TextSpan::from("]: ")) .add_col(TextSpan::from(record.msg.as_str())); } - assert!(self - .app - .attr( - &Id::Log, - Attribute::Content, - AttrValue::Table(table.build()) - ) - .is_ok()); + assert!( + self.app + .attr( + &Id::Log, + Attribute::Content, + AttrValue::Table(table.build()) + ) + .is_ok() + ); } pub(super) fn update_progress_bar(&mut self, filename: String) { - assert!(self - .app - .attr( - &Id::ProgressBarFull, - Attribute::Text, - AttrValue::String(self.transfer.full.to_string()) - ) - .is_ok()); - assert!(self - .app - .attr( - &Id::ProgressBarFull, - Attribute::Value, - AttrValue::Payload(PropPayload::One(PropValue::F64( - self.transfer.full.calc_progress() - ))) - ) - .is_ok()); - assert!(self - .app - .attr( - &Id::ProgressBarPartial, - Attribute::Text, - AttrValue::String(self.transfer.partial.to_string()) - ) - .is_ok()); - assert!(self - .app - .attr( - &Id::ProgressBarPartial, - Attribute::Value, - AttrValue::Payload(PropPayload::One(PropValue::F64( - self.transfer.partial.calc_progress() - ))) - ) - .is_ok()); - assert!(self - .app - .attr( - &Id::ProgressBarPartial, - Attribute::Title, - AttrValue::Title((filename, Alignment::Center)) - ) - .is_ok()); + assert!( + self.app + .attr( + &Id::ProgressBarFull, + Attribute::Text, + AttrValue::String(self.transfer.full.to_string()) + ) + .is_ok() + ); + assert!( + self.app + .attr( + &Id::ProgressBarFull, + Attribute::Value, + AttrValue::Payload(PropPayload::One(PropValue::F64( + self.transfer.full.calc_progress() + ))) + ) + .is_ok() + ); + assert!( + self.app + .attr( + &Id::ProgressBarPartial, + Attribute::Text, + AttrValue::String(self.transfer.partial.to_string()) + ) + .is_ok() + ); + assert!( + self.app + .attr( + &Id::ProgressBarPartial, + Attribute::Value, + AttrValue::Payload(PropPayload::One(PropValue::F64( + self.transfer.partial.calc_progress() + ))) + ) + .is_ok() + ); + assert!( + self.app + .attr( + &Id::ProgressBarPartial, + Attribute::Title, + AttrValue::Title((filename, Alignment::Center)) + ) + .is_ok() + ); } /// Finalize find process @@ -450,14 +462,15 @@ impl FileTransferActivity { .iter_files() .map(|x| vec![TextSpan::from(self.found().unwrap().fmt_file(x))]) .collect(); - assert!(self - .app - .attr( - &Id::ExplorerFind, - Attribute::Content, - AttrValue::Table(files) - ) - .is_ok()); + assert!( + self.app + .attr( + &Id::ExplorerFind, + Attribute::Content, + AttrValue::Table(files) + ) + .is_ok() + ); } pub(super) fn update_browser_file_list(&mut self) { diff --git a/src/ui/activities/filetransfer/mod.rs b/src/ui/activities/filetransfer/mod.rs index 2ec56bc..314f941 100644 --- a/src/ui/activities/filetransfer/mod.rs +++ b/src/ui/activities/filetransfer/mod.rs @@ -28,7 +28,7 @@ use session::TransferPayload; use tempfile::TempDir; use tuirealm::{Application, EventListenerCfg, NoUserEvent}; -use super::{Activity, Context, ExitReason, CROSSTERM_MAX_POLL}; +use super::{Activity, CROSSTERM_MAX_POLL, Context, ExitReason}; use crate::config::themes::Theme; use crate::explorer::{FileExplorer, FileSorting}; use crate::filetransfer::{ diff --git a/src/ui/activities/filetransfer/session.rs b/src/ui/activities/filetransfer/session.rs index 5fd5c47..4de9020 100644 --- a/src/ui/activities/filetransfer/session.rs +++ b/src/ui/activities/filetransfer/session.rs @@ -1239,7 +1239,7 @@ impl FileTransferActivity { None => { return Err(String::from( "Could not create tempfile: cache not available", - )) + )); } }; // Download file diff --git a/src/ui/activities/filetransfer/update.rs b/src/ui/activities/filetransfer/update.rs index 5eaecca..9e5ce5e 100644 --- a/src/ui/activities/filetransfer/update.rs +++ b/src/ui/activities/filetransfer/update.rs @@ -8,8 +8,8 @@ use remotefs::fs::File; use tuirealm::props::{AttrValue, Attribute}; use tuirealm::{State, StateValue, Update}; -use super::actions::walkdir::WalkdirError; use super::actions::SelectedFile; +use super::actions::walkdir::WalkdirError; use super::browser::{FileExplorerTab, FoundExplorerTab}; use super::{ExitReason, FileTransferActivity, Id, Msg, TransferMsg, TransferOpts, UiMsg}; diff --git a/src/ui/activities/filetransfer/view.rs b/src/ui/activities/filetransfer/view.rs index 33e8b20..ccbd286 100644 --- a/src/ui/activities/filetransfer/view.rs +++ b/src/ui/activities/filetransfer/view.rs @@ -14,7 +14,7 @@ use unicode_width::UnicodeWidthStr; use super::browser::{FileExplorerTab, FoundExplorerTab}; use super::components::ATTR_FILES; -use super::{components, Context, FileTransferActivity, Id}; +use super::{Context, FileTransferActivity, Id, components}; use crate::explorer::FileSorting; use crate::utils::ui::{Popup, Size}; @@ -33,50 +33,54 @@ impl FileTransferActivity { let key_color = self.theme().misc_keys; let log_panel = self.theme().transfer_log_window; let log_background = self.theme().transfer_log_background; - assert!(self - .app - .mount( - Id::FooterBar, - Box::new(components::FooterBar::new(key_color)), - vec![] - ) - .is_ok()); - assert!(self - .app - .mount( - Id::ExplorerHostBridge, - Box::new(components::ExplorerLocal::new( - "", - &[], - local_explorer_background, - local_explorer_foreground, - local_explorer_highlighted - )), - vec![] - ) - .is_ok()); - assert!(self - .app - .mount( - Id::ExplorerRemote, - Box::new(components::ExplorerRemote::new( - "", - &[], - remote_explorer_background, - remote_explorer_foreground, - remote_explorer_highlighted - )), - vec![] - ) - .is_ok()); - assert!(self - .app - .mount( - Id::Log, - Box::new(components::Log::new(vec![], log_panel, log_background)), - vec![] - ) - .is_ok()); + assert!( + self.app + .mount( + Id::FooterBar, + Box::new(components::FooterBar::new(key_color)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .mount( + Id::ExplorerHostBridge, + Box::new(components::ExplorerLocal::new( + "", + &[], + local_explorer_background, + local_explorer_foreground, + local_explorer_highlighted + )), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .mount( + Id::ExplorerRemote, + Box::new(components::ExplorerRemote::new( + "", + &[], + remote_explorer_background, + remote_explorer_foreground, + remote_explorer_highlighted + )), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .mount( + Id::Log, + Box::new(components::Log::new(vec![], log_panel, log_background)), + vec![] + ) + .is_ok() + ); // Load status bar self.refresh_local_status_bar(); self.refresh_remote_status_bar(); @@ -339,14 +343,15 @@ impl FileTransferActivity { pub(super) fn mount_info>(&mut self, text: S) { // Mount let info_color = self.theme().misc_info_dialog; - assert!(self - .app - .remount( - Id::ErrorPopup, - Box::new(components::ErrorPopup::new(text, info_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::ErrorPopup, + Box::new(components::ErrorPopup::new(text, info_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::ErrorPopup).is_ok()); } @@ -354,14 +359,15 @@ impl FileTransferActivity { pub(super) fn mount_error>(&mut self, text: S) { // Mount let error_color = self.theme().misc_error_dialog; - assert!(self - .app - .remount( - Id::ErrorPopup, - Box::new(components::ErrorPopup::new(text, error_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::ErrorPopup, + Box::new(components::ErrorPopup::new(text, error_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::ErrorPopup).is_ok()); } @@ -374,14 +380,15 @@ impl FileTransferActivity { self.umount_wait(); // Mount let error_color = self.theme().misc_error_dialog; - assert!(self - .app - .remount( - Id::FatalPopup, - Box::new(components::FatalPopup::new(text, error_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::FatalPopup, + Box::new(components::FatalPopup::new(text, error_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::FatalPopup).is_ok()); } @@ -392,30 +399,32 @@ impl FileTransferActivity { pub(super) fn mount_wait>(&mut self, text: S) { let color = self.theme().misc_info_dialog; - assert!(self - .app - .remount( - Id::WaitPopup, - Box::new(components::WaitPopup::new(text, color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::WaitPopup, + Box::new(components::WaitPopup::new(text, color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::WaitPopup).is_ok()); } pub(super) fn mount_walkdir_wait(&mut self) { let color = self.theme().misc_info_dialog; - assert!(self - .app - .remount( - Id::WaitPopup, - Box::new(components::WalkdirWaitPopup::new( - "Scanning current directory…", - color - )), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::WaitPopup, + Box::new(components::WalkdirWaitPopup::new( + "Scanning current directory…", + color + )), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::WaitPopup).is_ok()); self.view(); @@ -448,14 +457,15 @@ impl FileTransferActivity { pub(super) fn mount_quit(&mut self) { // Protocol let quit_color = self.theme().misc_quit_dialog; - assert!(self - .app - .remount( - Id::QuitPopup, - Box::new(components::QuitPopup::new(quit_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::QuitPopup, + Box::new(components::QuitPopup::new(quit_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::QuitPopup).is_ok()); } @@ -468,14 +478,15 @@ impl FileTransferActivity { pub(super) fn mount_disconnect(&mut self) { // Protocol let quit_color = self.theme().misc_quit_dialog; - assert!(self - .app - .remount( - Id::DisconnectPopup, - Box::new(components::DisconnectPopup::new(quit_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::DisconnectPopup, + Box::new(components::DisconnectPopup::new(quit_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::DisconnectPopup).is_ok()); } @@ -487,14 +498,15 @@ impl FileTransferActivity { pub(super) fn mount_chmod(&mut self, mode: UnixPex, title: String) { // Mount let color = self.theme().misc_input_dialog; - assert!(self - .app - .remount( - Id::ChmodPopup, - Box::new(components::ChmodPopup::new(mode, color, title)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::ChmodPopup, + Box::new(components::ChmodPopup::new(mode, color, title)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::ChmodPopup).is_ok()); } @@ -508,27 +520,29 @@ impl FileTransferActivity { pub(super) fn mount_filter(&mut self) { let input_color = self.theme().misc_input_dialog; - assert!(self - .app - .remount( - Id::FilterPopup, - Box::new(components::FilterPopup::new(input_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::FilterPopup, + Box::new(components::FilterPopup::new(input_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::FilterPopup).is_ok()); } pub(super) fn mount_copy(&mut self) { let input_color = self.theme().misc_input_dialog; - assert!(self - .app - .remount( - Id::CopyPopup, - Box::new(components::CopyPopup::new(input_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::CopyPopup, + Box::new(components::CopyPopup::new(input_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::CopyPopup).is_ok()); } @@ -538,14 +552,15 @@ impl FileTransferActivity { pub(super) fn mount_exec(&mut self) { let input_color = self.theme().misc_input_dialog; - assert!(self - .app - .remount( - Id::ExecPopup, - Box::new(components::ExecPopup::new(input_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::ExecPopup, + Box::new(components::ExecPopup::new(input_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::ExecPopup).is_ok()); } @@ -569,30 +584,31 @@ impl FileTransferActivity { }; // Mount component - assert!(self - .app - .remount( - Id::ExplorerFind, - if fuzzy_search { - Box::new(components::ExplorerFuzzy::new( - msg.to_string(), - &[], - bg, - fg, - hg, - )) - } else { - Box::new(components::ExplorerFind::new( - msg.to_string(), - &[], - bg, - fg, - hg, - )) - }, - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::ExplorerFind, + if fuzzy_search { + Box::new(components::ExplorerFuzzy::new( + msg.to_string(), + &[], + bg, + fg, + hg, + )) + } else { + Box::new(components::ExplorerFind::new( + msg.to_string(), + &[], + bg, + fg, + hg, + )) + }, + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::ExplorerFind).is_ok()); } @@ -611,14 +627,15 @@ impl FileTransferActivity { .collect::>(); let input_color = self.theme().misc_input_dialog; - assert!(self - .app - .remount( - Id::GotoPopup, - Box::new(components::GotoPopup::new(input_color, files)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::GotoPopup, + Box::new(components::GotoPopup::new(input_color, files)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::GotoPopup).is_ok()); } @@ -641,14 +658,15 @@ impl FileTransferActivity { pub(super) fn mount_mkdir(&mut self) { let input_color = self.theme().misc_input_dialog; - assert!(self - .app - .remount( - Id::MkdirPopup, - Box::new(components::MkdirPopup::new(input_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::MkdirPopup, + Box::new(components::MkdirPopup::new(input_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::MkdirPopup).is_ok()); } @@ -658,14 +676,15 @@ impl FileTransferActivity { pub(super) fn mount_newfile(&mut self) { let input_color = self.theme().misc_input_dialog; - assert!(self - .app - .remount( - Id::NewfilePopup, - Box::new(components::NewfilePopup::new(input_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::NewfilePopup, + Box::new(components::NewfilePopup::new(input_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::NewfilePopup).is_ok()); } @@ -675,14 +694,15 @@ impl FileTransferActivity { pub(super) fn mount_openwith(&mut self) { let input_color = self.theme().misc_input_dialog; - assert!(self - .app - .remount( - Id::OpenWithPopup, - Box::new(components::OpenWithPopup::new(input_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::OpenWithPopup, + Box::new(components::OpenWithPopup::new(input_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::OpenWithPopup).is_ok()); } @@ -692,14 +712,15 @@ impl FileTransferActivity { pub(super) fn mount_rename(&mut self) { let input_color = self.theme().misc_input_dialog; - assert!(self - .app - .remount( - Id::RenamePopup, - Box::new(components::RenamePopup::new(input_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::RenamePopup, + Box::new(components::RenamePopup::new(input_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::RenamePopup).is_ok()); } @@ -709,14 +730,15 @@ impl FileTransferActivity { pub(super) fn mount_saveas(&mut self) { let input_color = self.theme().misc_input_dialog; - assert!(self - .app - .remount( - Id::SaveAsPopup, - Box::new(components::SaveAsPopup::new(input_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::SaveAsPopup, + Box::new(components::SaveAsPopup::new(input_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::SaveAsPopup).is_ok()); } @@ -727,32 +749,34 @@ impl FileTransferActivity { pub(super) fn mount_progress_bar(&mut self, root_name: String) { let prog_color_full = self.theme().transfer_progress_bar_full; let prog_color_partial = self.theme().transfer_progress_bar_partial; - assert!(self - .app - .remount( - Id::ProgressBarFull, - Box::new(components::ProgressBarFull::new( - 0.0, - "", - &root_name, - prog_color_full - )), - vec![], - ) - .is_ok()); - assert!(self - .app - .remount( - Id::ProgressBarPartial, - Box::new(components::ProgressBarPartial::new( - 0.0, - "", - "Please wait", - prog_color_partial - )), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::ProgressBarFull, + Box::new(components::ProgressBarFull::new( + 0.0, + "", + &root_name, + prog_color_full + )), + vec![], + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::ProgressBarPartial, + Box::new(components::ProgressBarPartial::new( + 0.0, + "", + "Please wait", + prog_color_partial + )), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::ProgressBarPartial).is_ok()); } @@ -768,14 +792,15 @@ impl FileTransferActivity { FileExplorerTab::Remote => self.remote().get_file_sorting(), _ => return, }; - assert!(self - .app - .remount( - Id::SortingPopup, - Box::new(components::SortingPopup::new(sorting, sorting_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::SortingPopup, + Box::new(components::SortingPopup::new(sorting, sorting_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::SortingPopup).is_ok()); } @@ -785,14 +810,15 @@ impl FileTransferActivity { pub(super) fn mount_radio_delete(&mut self) { let warn_color = self.theme().misc_warn_dialog; - assert!(self - .app - .remount( - Id::DeletePopup, - Box::new(components::DeletePopup::new(warn_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::DeletePopup, + Box::new(components::DeletePopup::new(warn_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::DeletePopup).is_ok()); } @@ -802,16 +828,17 @@ impl FileTransferActivity { pub(super) fn mount_radio_watch(&mut self, watch: bool, local: &str, remote: &str) { let info_color = self.theme().misc_info_dialog; - assert!(self - .app - .remount( - Id::WatcherPopup, - Box::new(components::WatcherPopup::new( - watch, local, remote, info_color - )), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::WatcherPopup, + Box::new(components::WatcherPopup::new( + watch, local, remote, info_color + )), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::WatcherPopup).is_ok()); } @@ -821,14 +848,15 @@ impl FileTransferActivity { pub(super) fn mount_watched_paths_list(&mut self, paths: &[std::path::PathBuf]) { let info_color = self.theme().misc_info_dialog; - assert!(self - .app - .remount( - Id::WatchedPathsList, - Box::new(components::WatchedPathsList::new(paths, info_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::WatchedPathsList, + Box::new(components::WatchedPathsList::new(paths, info_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::WatchedPathsList).is_ok()); } @@ -838,35 +866,38 @@ impl FileTransferActivity { pub(super) fn mount_radio_replace(&mut self, file_name: &str) { let warn_color = self.theme().misc_warn_dialog; - assert!(self - .app - .remount( - Id::ReplacePopup, - Box::new(components::ReplacePopup::new(Some(file_name), warn_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::ReplacePopup, + Box::new(components::ReplacePopup::new(Some(file_name), warn_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::ReplacePopup).is_ok()); } pub(super) fn mount_radio_replace_many(&mut self, files: &[String]) { let warn_color = self.theme().misc_warn_dialog; - assert!(self - .app - .remount( - Id::ReplacingFilesListPopup, - Box::new(components::ReplacingFilesListPopup::new(files, warn_color)), - vec![], - ) - .is_ok()); - assert!(self - .app - .remount( - Id::ReplacePopup, - Box::new(components::ReplacePopup::new(None, warn_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::ReplacingFilesListPopup, + Box::new(components::ReplacingFilesListPopup::new(files, warn_color)), + vec![], + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::ReplacePopup, + Box::new(components::ReplacePopup::new(None, warn_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::ReplacePopup).is_ok()); } @@ -881,14 +912,15 @@ impl FileTransferActivity { } pub(super) fn mount_file_info(&mut self, file: &File) { - assert!(self - .app - .remount( - Id::FileInfoPopup, - Box::new(components::FileInfoPopup::new(file)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::FileInfoPopup, + Box::new(components::FileInfoPopup::new(file)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::FileInfoPopup).is_ok()); } @@ -899,49 +931,52 @@ impl FileTransferActivity { pub(super) fn refresh_local_status_bar(&mut self) { let sorting_color = self.theme().transfer_status_sorting; let hidden_color = self.theme().transfer_status_hidden; - assert!(self - .app - .remount( - Id::StatusBarHostBridge, - Box::new(components::StatusBarLocal::new( - &self.browser, - sorting_color, - hidden_color - )), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::StatusBarHostBridge, + Box::new(components::StatusBarLocal::new( + &self.browser, + sorting_color, + hidden_color + )), + vec![], + ) + .is_ok() + ); } pub(super) fn refresh_remote_status_bar(&mut self) { let sorting_color = self.theme().transfer_status_sorting; let hidden_color = self.theme().transfer_status_hidden; let sync_color = self.theme().transfer_status_sync_browsing; - assert!(self - .app - .remount( - Id::StatusBarRemote, - Box::new(components::StatusBarRemote::new( - &self.browser, - sorting_color, - hidden_color, - sync_color - )), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::StatusBarRemote, + Box::new(components::StatusBarRemote::new( + &self.browser, + sorting_color, + hidden_color, + sync_color + )), + vec![], + ) + .is_ok() + ); } pub(super) fn mount_symlink(&mut self) { let input_color = self.theme().misc_input_dialog; - assert!(self - .app - .remount( - Id::SymlinkPopup, - Box::new(components::SymlinkPopup::new(input_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::SymlinkPopup, + Box::new(components::SymlinkPopup::new(input_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::SymlinkPopup).is_ok()); } @@ -951,14 +986,15 @@ impl FileTransferActivity { pub(super) fn mount_sync_browsing_mkdir_popup(&mut self, dir_name: &str) { let color = self.theme().misc_info_dialog; - assert!(self - .app - .remount( - Id::SyncBrowsingMkdirPopup, - Box::new(components::SyncBrowsingMkdirPopup::new(color, dir_name,)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::SyncBrowsingMkdirPopup, + Box::new(components::SyncBrowsingMkdirPopup::new(color, dir_name,)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::SyncBrowsingMkdirPopup).is_ok()); } @@ -969,14 +1005,15 @@ impl FileTransferActivity { /// Mount help pub(super) fn mount_help(&mut self) { let key_color = self.theme().misc_keys; - assert!(self - .app - .remount( - Id::KeybindingsPopup, - Box::new(components::KeybindingsPopup::new(key_color)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::KeybindingsPopup, + Box::new(components::KeybindingsPopup::new(key_color)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::KeybindingsPopup).is_ok()); } @@ -1018,51 +1055,52 @@ impl FileTransferActivity { // -- global listener fn mount_global_listener(&mut self) { - assert!(self - .app - .mount( - Id::GlobalListener, - Box::::default(), - vec![ - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Esc, - modifiers: KeyModifiers::NONE, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Char('h'), - modifiers: KeyModifiers::NONE, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Function(1), - modifiers: KeyModifiers::NONE, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Function(10), - modifiers: KeyModifiers::NONE, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Char('q'), - modifiers: KeyModifiers::NONE, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new(SubEventClause::WindowResize, SubClause::Always) - ] - ) - .is_ok()); + assert!( + self.app + .mount( + Id::GlobalListener, + Box::::default(), + vec![ + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Esc, + modifiers: KeyModifiers::NONE, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Char('h'), + modifiers: KeyModifiers::NONE, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Function(1), + modifiers: KeyModifiers::NONE, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Function(10), + modifiers: KeyModifiers::NONE, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Char('q'), + modifiers: KeyModifiers::NONE, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new(SubEventClause::WindowResize, SubClause::Always) + ] + ) + .is_ok() + ); } /// Returns a sub clause which requires that no popup is mounted in order to be satisfied diff --git a/src/ui/activities/setup/actions.rs b/src/ui/activities/setup/actions.rs index 598b323..115ead6 100644 --- a/src/ui/activities/setup/actions.rs +++ b/src/ui/activities/setup/actions.rs @@ -135,7 +135,9 @@ impl SetupActivity { _ => String::new(), }; // Prepare text editor - env::set_var("EDITOR", self.config().get_text_editor()); + unsafe { + env::set_var("EDITOR", self.config().get_text_editor()); + } let placeholder: String = format!("# Type private SSH key for {username}@{host}\n"); // Put input mode back to normal if let Err(err) = self.context_mut().terminal().disable_raw_mode() { diff --git a/src/ui/activities/setup/config.rs b/src/ui/activities/setup/config.rs index 6b5e1ef..ae49445 100644 --- a/src/ui/activities/setup/config.rs +++ b/src/ui/activities/setup/config.rs @@ -59,7 +59,9 @@ impl SetupActivity { None => Ok(()), Some(ctx) => { // Set editor if config client exists - env::set_var("EDITOR", ctx.config().get_text_editor()); + unsafe { + env::set_var("EDITOR", ctx.config().get_text_editor()); + } // Prepare terminal if let Err(err) = ctx.terminal().disable_raw_mode() { error!("Failed to disable raw mode: {}", err); diff --git a/src/ui/activities/setup/mod.rs b/src/ui/activities/setup/mod.rs index 996efab..1a6fb2b 100644 --- a/src/ui/activities/setup/mod.rs +++ b/src/ui/activities/setup/mod.rs @@ -19,7 +19,7 @@ use tuirealm::listener::EventListenerCfg; use tuirealm::props::Color; use tuirealm::{Application, NoUserEvent, Update}; -use super::{Activity, Context, ExitReason, CROSSTERM_MAX_POLL}; +use super::{Activity, CROSSTERM_MAX_POLL, Context, ExitReason}; use crate::config::themes::Theme; use crate::system::config_client::ConfigClient; use crate::system::theme_provider::ThemeProvider; diff --git a/src/ui/activities/setup/update.rs b/src/ui/activities/setup/update.rs index d5f6cf3..d2460c9 100644 --- a/src/ui/activities/setup/update.rs +++ b/src/ui/activities/setup/update.rs @@ -103,10 +103,11 @@ impl SetupActivity { fn config_update(&mut self, msg: ConfigMsg) -> Option { match msg { ConfigMsg::CheckUpdatesBlurDown => { - assert!(self - .app - .active(&Id::Config(IdConfig::PromptOnFileReplace)) - .is_ok()); + assert!( + self.app + .active(&Id::Config(IdConfig::PromptOnFileReplace)) + .is_ok() + ); } ConfigMsg::CheckUpdatesBlurUp => { assert!(self.app.active(&Id::Config(IdConfig::HiddenFiles)).is_ok()); @@ -121,49 +122,55 @@ impl SetupActivity { assert!(self.app.active(&Id::Config(IdConfig::LocalFileFmt)).is_ok()); } ConfigMsg::GroupDirsBlurUp => { - assert!(self - .app - .active(&Id::Config(IdConfig::PromptOnFileReplace)) - .is_ok()); + assert!( + self.app + .active(&Id::Config(IdConfig::PromptOnFileReplace)) + .is_ok() + ); } ConfigMsg::HiddenFilesBlurDown => { assert!(self.app.active(&Id::Config(IdConfig::CheckUpdates)).is_ok()); } ConfigMsg::HiddenFilesBlurUp => { - assert!(self - .app - .active(&Id::Config(IdConfig::DefaultProtocol)) - .is_ok()); + assert!( + self.app + .active(&Id::Config(IdConfig::DefaultProtocol)) + .is_ok() + ); } ConfigMsg::LocalFileFmtBlurDown => { - assert!(self - .app - .active(&Id::Config(IdConfig::RemoteFileFmt)) - .is_ok()); + assert!( + self.app + .active(&Id::Config(IdConfig::RemoteFileFmt)) + .is_ok() + ); } ConfigMsg::LocalFileFmtBlurUp => { assert!(self.app.active(&Id::Config(IdConfig::GroupDirs)).is_ok()); } ConfigMsg::NotificationsEnabledBlurDown => { - assert!(self - .app - .active(&Id::Config(IdConfig::NotificationsThreshold)) - .is_ok()); + assert!( + self.app + .active(&Id::Config(IdConfig::NotificationsThreshold)) + .is_ok() + ); } ConfigMsg::NotificationsEnabledBlurUp => { - assert!(self - .app - .active(&Id::Config(IdConfig::RemoteFileFmt)) - .is_ok()); + assert!( + self.app + .active(&Id::Config(IdConfig::RemoteFileFmt)) + .is_ok() + ); } ConfigMsg::NotificationsThresholdBlurDown => { assert!(self.app.active(&Id::Config(IdConfig::SshConfig)).is_ok()); } ConfigMsg::NotificationsThresholdBlurUp => { - assert!(self - .app - .active(&Id::Config(IdConfig::NotificationsEnabled)) - .is_ok()); + assert!( + self.app + .active(&Id::Config(IdConfig::NotificationsEnabled)) + .is_ok() + ); } ConfigMsg::PromptOnFileReplaceBlurDown => { assert!(self.app.active(&Id::Config(IdConfig::GroupDirs)).is_ok()); @@ -172,19 +179,21 @@ impl SetupActivity { assert!(self.app.active(&Id::Config(IdConfig::CheckUpdates)).is_ok()); } ConfigMsg::RemoteFileFmtBlurDown => { - assert!(self - .app - .active(&Id::Config(IdConfig::NotificationsEnabled)) - .is_ok()); + assert!( + self.app + .active(&Id::Config(IdConfig::NotificationsEnabled)) + .is_ok() + ); } ConfigMsg::RemoteFileFmtBlurUp => { assert!(self.app.active(&Id::Config(IdConfig::LocalFileFmt)).is_ok()); } ConfigMsg::TextEditorBlurDown => { - assert!(self - .app - .active(&Id::Config(IdConfig::DefaultProtocol)) - .is_ok()); + assert!( + self.app + .active(&Id::Config(IdConfig::DefaultProtocol)) + .is_ok() + ); } ConfigMsg::TextEditorBlurUp => { assert!(self.app.active(&Id::Config(IdConfig::SshConfig)).is_ok()); @@ -193,10 +202,11 @@ impl SetupActivity { assert!(self.app.active(&Id::Config(IdConfig::TextEditor)).is_ok()); } ConfigMsg::SshConfigBlurUp => { - assert!(self - .app - .active(&Id::Config(IdConfig::NotificationsThreshold)) - .is_ok()); + assert!( + self.app + .active(&Id::Config(IdConfig::NotificationsThreshold)) + .is_ok() + ); } ConfigMsg::ConfigChanged => { self.set_config_changed(true); @@ -259,10 +269,11 @@ impl SetupActivity { assert!(self.app.active(&Id::Theme(IdTheme::AuthProtocol)).is_ok()); } ThemeMsg::AuthBookmarksBlurDown => { - assert!(self - .app - .active(&Id::Theme(IdTheme::AuthRecentHosts)) - .is_ok()); + assert!( + self.app + .active(&Id::Theme(IdTheme::AuthRecentHosts)) + .is_ok() + ); } ThemeMsg::AuthBookmarksBlurUp => { assert!(self.app.active(&Id::Theme(IdTheme::AuthPassword)).is_ok()); @@ -301,10 +312,11 @@ impl SetupActivity { assert!(self.app.active(&Id::Theme(IdTheme::MiscInfo)).is_ok()); } ThemeMsg::MiscErrorBlurUp => { - assert!(self - .app - .active(&Id::Theme(IdTheme::AuthRecentHosts)) - .is_ok()); + assert!( + self.app + .active(&Id::Theme(IdTheme::AuthRecentHosts)) + .is_ok() + ); } ThemeMsg::MiscInfoBlurDown => { assert!(self.app.active(&Id::Theme(IdTheme::MiscInput)).is_ok()); @@ -337,88 +349,100 @@ impl SetupActivity { assert!(self.app.active(&Id::Theme(IdTheme::MiscQuit)).is_ok()); } ThemeMsg::MiscWarnBlurDown => { - assert!(self - .app - .active(&Id::Theme(IdTheme::ExplorerLocalBg)) - .is_ok()); + assert!( + self.app + .active(&Id::Theme(IdTheme::ExplorerLocalBg)) + .is_ok() + ); } ThemeMsg::MiscWarnBlurUp => { assert!(self.app.active(&Id::Theme(IdTheme::MiscSave)).is_ok()); } ThemeMsg::ExplorerLocalBgBlurDown => { - assert!(self - .app - .active(&Id::Theme(IdTheme::ExplorerLocalFg)) - .is_ok()); + assert!( + self.app + .active(&Id::Theme(IdTheme::ExplorerLocalFg)) + .is_ok() + ); } ThemeMsg::ExplorerLocalBgBlurUp => { assert!(self.app.active(&Id::Theme(IdTheme::MiscWarn)).is_ok()); } ThemeMsg::ExplorerLocalFgBlurDown => { - assert!(self - .app - .active(&Id::Theme(IdTheme::ExplorerLocalHg)) - .is_ok()); + assert!( + self.app + .active(&Id::Theme(IdTheme::ExplorerLocalHg)) + .is_ok() + ); } ThemeMsg::ExplorerLocalFgBlurUp => { - assert!(self - .app - .active(&Id::Theme(IdTheme::ExplorerLocalBg)) - .is_ok()); + assert!( + self.app + .active(&Id::Theme(IdTheme::ExplorerLocalBg)) + .is_ok() + ); } ThemeMsg::ExplorerLocalHgBlurDown => { - assert!(self - .app - .active(&Id::Theme(IdTheme::ExplorerRemoteBg)) - .is_ok()); + assert!( + self.app + .active(&Id::Theme(IdTheme::ExplorerRemoteBg)) + .is_ok() + ); } ThemeMsg::ExplorerLocalHgBlurUp => { - assert!(self - .app - .active(&Id::Theme(IdTheme::ExplorerLocalFg)) - .is_ok()); + assert!( + self.app + .active(&Id::Theme(IdTheme::ExplorerLocalFg)) + .is_ok() + ); } ThemeMsg::ExplorerRemoteBgBlurDown => { - assert!(self - .app - .active(&Id::Theme(IdTheme::ExplorerRemoteFg)) - .is_ok()); + assert!( + self.app + .active(&Id::Theme(IdTheme::ExplorerRemoteFg)) + .is_ok() + ); } ThemeMsg::ExplorerRemoteBgBlurUp => { - assert!(self - .app - .active(&Id::Theme(IdTheme::ExplorerLocalHg)) - .is_ok()); + assert!( + self.app + .active(&Id::Theme(IdTheme::ExplorerLocalHg)) + .is_ok() + ); } ThemeMsg::ExplorerRemoteFgBlurDown => { - assert!(self - .app - .active(&Id::Theme(IdTheme::ExplorerRemoteHg)) - .is_ok()); + assert!( + self.app + .active(&Id::Theme(IdTheme::ExplorerRemoteHg)) + .is_ok() + ); } ThemeMsg::ExplorerRemoteFgBlurUp => { - assert!(self - .app - .active(&Id::Theme(IdTheme::ExplorerRemoteBg)) - .is_ok()); + assert!( + self.app + .active(&Id::Theme(IdTheme::ExplorerRemoteBg)) + .is_ok() + ); } ThemeMsg::ExplorerRemoteHgBlurDown => { assert!(self.app.active(&Id::Theme(IdTheme::ProgBarFull)).is_ok()); } ThemeMsg::ExplorerRemoteHgBlurUp => { - assert!(self - .app - .active(&Id::Theme(IdTheme::ExplorerRemoteFg)) - .is_ok()); + assert!( + self.app + .active(&Id::Theme(IdTheme::ExplorerRemoteFg)) + .is_ok() + ); } ThemeMsg::ProgBarFullBlurDown => { assert!(self.app.active(&Id::Theme(IdTheme::ProgBarPartial)).is_ok()); } ThemeMsg::ProgBarFullBlurUp => { - assert!(self - .app - .active(&Id::Theme(IdTheme::ExplorerRemoteHg)) - .is_ok()); + assert!( + self.app + .active(&Id::Theme(IdTheme::ExplorerRemoteHg)) + .is_ok() + ); } ThemeMsg::ProgBarPartialBlurDown => { assert!(self.app.active(&Id::Theme(IdTheme::LogBg)).is_ok()); diff --git a/src/ui/activities/setup/view/mod.rs b/src/ui/activities/setup/view/mod.rs index 99dbec3..b382077 100644 --- a/src/ui/activities/setup/view/mod.rs +++ b/src/ui/activities/setup/view/mod.rs @@ -40,14 +40,15 @@ impl SetupActivity { /// Mount error box pub(super) fn mount_error>(&mut self, text: S) { - assert!(self - .app - .remount( - Id::Common(IdCommon::ErrorPopup), - Box::new(components::ErrorPopup::new(text)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Common(IdCommon::ErrorPopup), + Box::new(components::ErrorPopup::new(text)), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::Common(IdCommon::ErrorPopup)).is_ok()); } @@ -58,14 +59,15 @@ impl SetupActivity { /// Mount quit popup pub(super) fn mount_quit(&mut self) { - assert!(self - .app - .remount( - Id::Common(IdCommon::QuitPopup), - Box::::default(), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Common(IdCommon::QuitPopup), + Box::::default(), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::Common(IdCommon::QuitPopup)).is_ok()); } @@ -76,14 +78,15 @@ impl SetupActivity { /// Mount save popup pub(super) fn mount_save_popup(&mut self) { - assert!(self - .app - .remount( - Id::Common(IdCommon::SavePopup), - Box::::default(), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Common(IdCommon::SavePopup), + Box::::default(), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::Common(IdCommon::SavePopup)).is_ok()); } @@ -94,14 +97,15 @@ impl SetupActivity { /// Mount help pub(super) fn mount_help(&mut self) { - assert!(self - .app - .remount( - Id::Common(IdCommon::Keybindings), - Box::::default(), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Common(IdCommon::Keybindings), + Box::::default(), + vec![], + ) + .is_ok() + ); assert!(self.app.active(&Id::Common(IdCommon::Keybindings)).is_ok()); } @@ -144,93 +148,96 @@ impl SetupActivity { /// Mount common components fn mount_commons(&mut self, layout: ViewLayout) { // Radio tab - assert!(self - .app - .remount( - Id::Common(IdCommon::Header), - Box::new(components::Header::new(layout)), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Common(IdCommon::Header), + Box::new(components::Header::new(layout)), + vec![], + ) + .is_ok() + ); // Footer - assert!(self - .app - .remount( - Id::Common(IdCommon::Footer), - Box::::default(), - vec![], - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Common(IdCommon::Footer), + Box::::default(), + vec![], + ) + .is_ok() + ); } /// Mount global listener fn mount_global_listener(&mut self) { - assert!(self - .app - .mount( - Id::Common(IdCommon::GlobalListener), - Box::::default(), - vec![ - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Esc, - modifiers: KeyModifiers::NONE, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Function(10), - modifiers: KeyModifiers::NONE, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Tab, - modifiers: KeyModifiers::NONE, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Char('h'), - modifiers: KeyModifiers::CONTROL, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Function(1), - modifiers: KeyModifiers::NONE, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Char('r'), - modifiers: KeyModifiers::CONTROL, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Char('s'), - modifiers: KeyModifiers::CONTROL, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new( - SubEventClause::Keyboard(KeyEvent { - code: Key::Function(4), - modifiers: KeyModifiers::NONE, - }), - Self::no_popup_mounted_clause(), - ), - Sub::new(SubEventClause::WindowResize, SubClause::Always) - ] - ) - .is_ok()); + assert!( + self.app + .mount( + Id::Common(IdCommon::GlobalListener), + Box::::default(), + vec![ + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Esc, + modifiers: KeyModifiers::NONE, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Function(10), + modifiers: KeyModifiers::NONE, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Tab, + modifiers: KeyModifiers::NONE, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Char('h'), + modifiers: KeyModifiers::CONTROL, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Function(1), + modifiers: KeyModifiers::NONE, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Char('r'), + modifiers: KeyModifiers::CONTROL, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Char('s'), + modifiers: KeyModifiers::CONTROL, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new( + SubEventClause::Keyboard(KeyEvent { + code: Key::Function(4), + modifiers: KeyModifiers::NONE, + }), + Self::no_popup_mounted_clause(), + ), + Sub::new(SubEventClause::WindowResize, SubClause::Always) + ] + ) + .is_ok() + ); } /// Returns a sub clause which requires that no popup is mounted in order to be satisfied diff --git a/src/ui/activities/setup/view/setup.rs b/src/ui/activities/setup/view/setup.rs index f601fe3..f32ed58 100644 --- a/src/ui/activities/setup/view/setup.rs +++ b/src/ui/activities/setup/view/setup.rs @@ -11,8 +11,8 @@ use tuirealm::ratatui::layout::{Constraint, Direction, Layout}; use tuirealm::{State, StateValue}; use super::{ - components, Context, Id, IdCommon, IdConfig, SetupActivity, ViewLayout, RADIO_PROTOCOL_KUBE, - RADIO_PROTOCOL_WEBDAV, + Context, Id, IdCommon, IdConfig, RADIO_PROTOCOL_KUBE, RADIO_PROTOCOL_WEBDAV, SetupActivity, + ViewLayout, components, }; use crate::explorer::GroupDirs; use crate::filetransfer::FileTransferProtocol; @@ -145,122 +145,133 @@ impl SetupActivity { // Text editor let text_editor: String = String::from(self.config().get_text_editor().as_path().to_string_lossy()); - assert!(self - .app - .remount( - Id::Config(IdConfig::TextEditor), - Box::new(components::TextEditor::new(text_editor.as_str())), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Config(IdConfig::TextEditor), + Box::new(components::TextEditor::new(text_editor.as_str())), + vec![] + ) + .is_ok() + ); // Protocol - assert!(self - .app - .remount( - Id::Config(IdConfig::DefaultProtocol), - Box::new(components::DefaultProtocol::new( - self.config().get_default_protocol() - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Config(IdConfig::DefaultProtocol), + Box::new(components::DefaultProtocol::new( + self.config().get_default_protocol() + )), + vec![] + ) + .is_ok() + ); // Hidden files - assert!(self - .app - .remount( - Id::Config(IdConfig::HiddenFiles), - Box::new(components::HiddenFiles::new( - self.config().get_show_hidden_files() - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Config(IdConfig::HiddenFiles), + Box::new(components::HiddenFiles::new( + self.config().get_show_hidden_files() + )), + vec![] + ) + .is_ok() + ); // Updates - assert!(self - .app - .remount( - Id::Config(IdConfig::CheckUpdates), - Box::new(components::CheckUpdates::new( - self.config().get_check_for_updates() - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Config(IdConfig::CheckUpdates), + Box::new(components::CheckUpdates::new( + self.config().get_check_for_updates() + )), + vec![] + ) + .is_ok() + ); // File replace - assert!(self - .app - .remount( - Id::Config(IdConfig::PromptOnFileReplace), - Box::new(components::PromptOnFileReplace::new( - self.config().get_prompt_on_file_replace() - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Config(IdConfig::PromptOnFileReplace), + Box::new(components::PromptOnFileReplace::new( + self.config().get_prompt_on_file_replace() + )), + vec![] + ) + .is_ok() + ); // Group dirs - assert!(self - .app - .remount( - Id::Config(IdConfig::GroupDirs), - Box::new(components::GroupDirs::new(self.config().get_group_dirs())), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Config(IdConfig::GroupDirs), + Box::new(components::GroupDirs::new(self.config().get_group_dirs())), + vec![] + ) + .is_ok() + ); // Local File Fmt - assert!(self - .app - .remount( - Id::Config(IdConfig::LocalFileFmt), - Box::new(components::LocalFileFmt::new( - &self.config().get_local_file_fmt().unwrap_or_default() - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Config(IdConfig::LocalFileFmt), + Box::new(components::LocalFileFmt::new( + &self.config().get_local_file_fmt().unwrap_or_default() + )), + vec![] + ) + .is_ok() + ); // Remote File Fmt - assert!(self - .app - .remount( - Id::Config(IdConfig::RemoteFileFmt), - Box::new(components::RemoteFileFmt::new( - &self.config().get_remote_file_fmt().unwrap_or_default() - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Config(IdConfig::RemoteFileFmt), + Box::new(components::RemoteFileFmt::new( + &self.config().get_remote_file_fmt().unwrap_or_default() + )), + vec![] + ) + .is_ok() + ); // Notifications enabled - assert!(self - .app - .remount( - Id::Config(IdConfig::NotificationsEnabled), - Box::new(components::NotificationsEnabled::new( - self.config().get_notifications() - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Config(IdConfig::NotificationsEnabled), + Box::new(components::NotificationsEnabled::new( + self.config().get_notifications() + )), + vec![] + ) + .is_ok() + ); // Notifications threshold - assert!(self - .app - .remount( - Id::Config(IdConfig::NotificationsThreshold), - Box::new(components::NotificationsThreshold::new(&fmt_bytes( - self.config().get_notification_threshold() - ))), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Config(IdConfig::NotificationsThreshold), + Box::new(components::NotificationsThreshold::new(&fmt_bytes( + self.config().get_notification_threshold() + ))), + vec![] + ) + .is_ok() + ); // Ssh config - assert!(self - .app - .remount( - Id::Config(IdConfig::SshConfig), - Box::new(components::SshConfig::new( - self.config().get_ssh_config().unwrap_or("") - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Config(IdConfig::SshConfig), + Box::new(components::SshConfig::new( + self.config().get_ssh_config().unwrap_or("") + )), + vec![] + ) + .is_ok() + ); } /// Collect values from input and put them into the configuration diff --git a/src/ui/activities/setup/view/ssh_keys.rs b/src/ui/activities/setup/view/ssh_keys.rs index 697ec59..7dba30f 100644 --- a/src/ui/activities/setup/view/ssh_keys.rs +++ b/src/ui/activities/setup/view/ssh_keys.rs @@ -8,7 +8,7 @@ use tuirealm::ratatui::layout::{Constraint, Direction, Layout}; use tuirealm::ratatui::widgets::Clear; -use super::{components, Context, Id, IdCommon, IdSsh, SetupActivity, ViewLayout}; +use super::{Context, Id, IdCommon, IdSsh, SetupActivity, ViewLayout, components}; use crate::utils::ui::{Popup, Size}; impl SetupActivity { @@ -74,14 +74,15 @@ impl SetupActivity { /// Mount delete ssh key component pub(crate) fn mount_del_ssh_key(&mut self) { - assert!(self - .app - .remount( - Id::Ssh(IdSsh::DelSshKeyPopup), - Box::::default(), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Ssh(IdSsh::DelSshKeyPopup), + Box::::default(), + vec![] + ) + .is_ok() + ); assert!(self.app.active(&Id::Ssh(IdSsh::DelSshKeyPopup)).is_ok()); } @@ -92,22 +93,24 @@ impl SetupActivity { /// Mount new ssh key prompt pub(crate) fn mount_new_ssh_key(&mut self) { - assert!(self - .app - .remount( - Id::Ssh(IdSsh::SshHost), - Box::::default(), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Ssh(IdSsh::SshUsername), - Box::::default(), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Ssh(IdSsh::SshHost), + Box::::default(), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Ssh(IdSsh::SshUsername), + Box::::default(), + vec![] + ) + .is_ok() + ); assert!(self.app.active(&Id::Ssh(IdSsh::SshHost)).is_ok()); } @@ -127,14 +130,15 @@ impl SetupActivity { format!("{username} at {addr}") }) .collect(); - assert!(self - .app - .remount( - Id::Ssh(IdSsh::SshKeys), - Box::new(components::SshKeys::new(&keys)), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Ssh(IdSsh::SshKeys), + Box::new(components::SshKeys::new(&keys)), + vec![] + ) + .is_ok() + ); assert!(self.app.active(&Id::Ssh(IdSsh::SshKeys)).is_ok()); } } diff --git a/src/ui/activities/setup/view/theme.rs b/src/ui/activities/setup/view/theme.rs index 4b97673..4a2492f 100644 --- a/src/ui/activities/setup/view/theme.rs +++ b/src/ui/activities/setup/view/theme.rs @@ -7,7 +7,7 @@ // Ext use tuirealm::ratatui::layout::{Constraint, Direction, Layout}; -use super::{components, Context, Id, IdCommon, IdTheme, SetupActivity, Theme, ViewLayout}; +use super::{Context, Id, IdCommon, IdTheme, SetupActivity, Theme, ViewLayout, components}; impl SetupActivity { // -- view @@ -242,278 +242,309 @@ impl SetupActivity { } fn load_titles(&mut self) { - assert!(self - .app - .remount( - Id::Theme(IdTheme::AuthTitle), - Box::::default(), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::MiscTitle), - Box::::default(), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::TransferTitle), - Box::::default(), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::TransferTitle2), - Box::::default(), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Theme(IdTheme::AuthTitle), + Box::::default(), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::MiscTitle), + Box::::default(), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::TransferTitle), + Box::::default(), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::TransferTitle2), + Box::::default(), + vec![] + ) + .is_ok() + ); } /// Load values from theme into input fields pub(crate) fn load_styles(&mut self) { let theme: Theme = self.theme().clone(); - assert!(self - .app - .remount( - Id::Theme(IdTheme::AuthAddress), - Box::new(components::AuthAddress::new(theme.auth_address)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::AuthBookmarks), - Box::new(components::AuthBookmarks::new(theme.auth_bookmarks)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::AuthPassword), - Box::new(components::AuthPassword::new(theme.auth_password)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::AuthPort), - Box::new(components::AuthPort::new(theme.auth_port)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::AuthProtocol), - Box::new(components::AuthProtocol::new(theme.auth_protocol)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::AuthRecentHosts), - Box::new(components::AuthRecentHosts::new(theme.auth_recents)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::AuthUsername), - Box::new(components::AuthUsername::new(theme.auth_username)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::MiscError), - Box::new(components::MiscError::new(theme.misc_error_dialog)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::MiscInfo), - Box::new(components::MiscInfo::new(theme.misc_info_dialog)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::MiscInput), - Box::new(components::MiscInput::new(theme.misc_input_dialog)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::MiscKeys), - Box::new(components::MiscKeys::new(theme.misc_keys)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::MiscQuit), - Box::new(components::MiscQuit::new(theme.misc_quit_dialog)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::MiscSave), - Box::new(components::MiscSave::new(theme.misc_save_dialog)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::MiscWarn), - Box::new(components::MiscWarn::new(theme.misc_warn_dialog)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::ExplorerLocalBg), - Box::new(components::ExplorerLocalBg::new( - theme.transfer_local_explorer_background - )), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::ExplorerLocalFg), - Box::new(components::ExplorerLocalFg::new( - theme.transfer_local_explorer_foreground - )), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::ExplorerLocalHg), - Box::new(components::ExplorerLocalHg::new( - theme.transfer_local_explorer_highlighted - )), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::ExplorerRemoteBg), - Box::new(components::ExplorerRemoteBg::new( - theme.transfer_remote_explorer_background - )), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::ExplorerRemoteFg), - Box::new(components::ExplorerRemoteFg::new( - theme.transfer_remote_explorer_foreground - )), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::ExplorerRemoteHg), - Box::new(components::ExplorerRemoteHg::new( - theme.transfer_remote_explorer_highlighted - )), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::ProgBarFull), - Box::new(components::ProgBarFull::new( - theme.transfer_progress_bar_full - )), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::ProgBarPartial), - Box::new(components::ProgBarPartial::new( - theme.transfer_progress_bar_partial - )), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::LogBg), - Box::new(components::LogBg::new(theme.transfer_log_background)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::LogWindow), - Box::new(components::LogWindow::new(theme.transfer_log_window)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::StatusSorting), - Box::new(components::StatusSorting::new( - theme.transfer_status_sorting - )), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::StatusHidden), - Box::new(components::StatusHidden::new(theme.transfer_status_hidden)), - vec![] - ) - .is_ok()); - assert!(self - .app - .remount( - Id::Theme(IdTheme::StatusSync), - Box::new(components::StatusSync::new( - theme.transfer_status_sync_browsing - )), - vec![] - ) - .is_ok()); + assert!( + self.app + .remount( + Id::Theme(IdTheme::AuthAddress), + Box::new(components::AuthAddress::new(theme.auth_address)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::AuthBookmarks), + Box::new(components::AuthBookmarks::new(theme.auth_bookmarks)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::AuthPassword), + Box::new(components::AuthPassword::new(theme.auth_password)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::AuthPort), + Box::new(components::AuthPort::new(theme.auth_port)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::AuthProtocol), + Box::new(components::AuthProtocol::new(theme.auth_protocol)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::AuthRecentHosts), + Box::new(components::AuthRecentHosts::new(theme.auth_recents)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::AuthUsername), + Box::new(components::AuthUsername::new(theme.auth_username)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::MiscError), + Box::new(components::MiscError::new(theme.misc_error_dialog)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::MiscInfo), + Box::new(components::MiscInfo::new(theme.misc_info_dialog)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::MiscInput), + Box::new(components::MiscInput::new(theme.misc_input_dialog)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::MiscKeys), + Box::new(components::MiscKeys::new(theme.misc_keys)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::MiscQuit), + Box::new(components::MiscQuit::new(theme.misc_quit_dialog)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::MiscSave), + Box::new(components::MiscSave::new(theme.misc_save_dialog)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::MiscWarn), + Box::new(components::MiscWarn::new(theme.misc_warn_dialog)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::ExplorerLocalBg), + Box::new(components::ExplorerLocalBg::new( + theme.transfer_local_explorer_background + )), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::ExplorerLocalFg), + Box::new(components::ExplorerLocalFg::new( + theme.transfer_local_explorer_foreground + )), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::ExplorerLocalHg), + Box::new(components::ExplorerLocalHg::new( + theme.transfer_local_explorer_highlighted + )), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::ExplorerRemoteBg), + Box::new(components::ExplorerRemoteBg::new( + theme.transfer_remote_explorer_background + )), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::ExplorerRemoteFg), + Box::new(components::ExplorerRemoteFg::new( + theme.transfer_remote_explorer_foreground + )), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::ExplorerRemoteHg), + Box::new(components::ExplorerRemoteHg::new( + theme.transfer_remote_explorer_highlighted + )), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::ProgBarFull), + Box::new(components::ProgBarFull::new( + theme.transfer_progress_bar_full + )), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::ProgBarPartial), + Box::new(components::ProgBarPartial::new( + theme.transfer_progress_bar_partial + )), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::LogBg), + Box::new(components::LogBg::new(theme.transfer_log_background)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::LogWindow), + Box::new(components::LogWindow::new(theme.transfer_log_window)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::StatusSorting), + Box::new(components::StatusSorting::new( + theme.transfer_status_sorting + )), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::StatusHidden), + Box::new(components::StatusHidden::new(theme.transfer_status_hidden)), + vec![] + ) + .is_ok() + ); + assert!( + self.app + .remount( + Id::Theme(IdTheme::StatusSync), + Box::new(components::StatusSync::new( + theme.transfer_status_sync_browsing + )), + vec![] + ) + .is_ok() + ); } } diff --git a/src/utils/random.rs b/src/utils/random.rs index 7af047d..b06bea7 100644 --- a/src/utils/random.rs +++ b/src/utils/random.rs @@ -3,12 +3,13 @@ //! `random` is the module which provides utilities for rand // Ext -use rand::distributions::Alphanumeric; -use rand::{thread_rng, Rng}; + +use rand::distr::Alphanumeric; +use rand::{Rng, rng}; /// Generate a random alphanumeric string with provided length pub fn random_alphanumeric_with_len(len: usize) -> String { - let mut rng = thread_rng(); + let mut rng = rng(); std::iter::repeat(()) .map(|()| rng.sample(Alphanumeric)) .map(char::from) diff --git a/src/utils/ssh.rs b/src/utils/ssh.rs index b8b4775..953536d 100644 --- a/src/utils/ssh.rs +++ b/src/utils/ssh.rs @@ -20,7 +20,9 @@ mod test { #[test] fn should_parse_ssh2_config() { - let rsa_key = test_helpers::create_sample_file_with_content("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDErJhQxEI0+VvhlXVUyh+vMCm7aXfCA/g633AG8ezD/5EylwchtAr2JCoBWnxn4zV8nI9dMqOgm0jO4IsXpKOjQojv+0VOH7I+cDlBg0tk4hFlvyyS6YviDAfDDln3jYUM+5QNDfQLaZlH2WvcJ3mkDxLVlI9MBX1BAeSmChLxwAvxALp2ncImNQLzDO9eHcig3dtMrEKkzXQowRW5Y7eUzg2+vvVq4H2DOjWwUndvB5sJkhEfTUVE7ID8ZdGJo60kUb/02dZYj+IbkAnMCsqktk0cg/4XFX82hEfRYFeb1arkysFisPU1DOb6QielL/axeTebVplaouYcXY0pFdJt root@8c50fd4c345a"); + let rsa_key = test_helpers::create_sample_file_with_content( + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDErJhQxEI0+VvhlXVUyh+vMCm7aXfCA/g633AG8ezD/5EylwchtAr2JCoBWnxn4zV8nI9dMqOgm0jO4IsXpKOjQojv+0VOH7I+cDlBg0tk4hFlvyyS6YviDAfDDln3jYUM+5QNDfQLaZlH2WvcJ3mkDxLVlI9MBX1BAeSmChLxwAvxALp2ncImNQLzDO9eHcig3dtMrEKkzXQowRW5Y7eUzg2+vvVq4H2DOjWwUndvB5sJkhEfTUVE7ID8ZdGJo60kUb/02dZYj+IbkAnMCsqktk0cg/4XFX82hEfRYFeb1arkysFisPU1DOb6QielL/axeTebVplaouYcXY0pFdJt root@8c50fd4c345a", + ); let ssh_config_file = test_helpers::create_sample_file_with_content(format!( r#" Host test @@ -34,13 +36,15 @@ Host test rsa_key.path().display() )); - assert!(parse_ssh2_config( - ssh_config_file - .path() - .to_string_lossy() - .to_string() - .as_str() - ) - .is_ok()); + assert!( + parse_ssh2_config( + ssh_config_file + .path() + .to_string_lossy() + .to_string() + .as_str() + ) + .is_ok() + ); } } diff --git a/src/utils/test_helpers.rs b/src/utils/test_helpers.rs index a1f604c..5d1ddce 100644 --- a/src/utils/test_helpers.rs +++ b/src/utils/test_helpers.rs @@ -24,7 +24,9 @@ pub fn create_sample_file_entry() -> (File, NamedTempFile) { /// Create sample file with default lorem ipsum content pub fn create_sample_file() -> NamedTempFile { - create_sample_file_with_content("Lorem ipsum dolor sit amet, consectetur adipiscing elit.Mauris ultricies consequat eros,nec scelerisque magna imperdiet metus.") + create_sample_file_with_content( + "Lorem ipsum dolor sit amet, consectetur adipiscing elit.Mauris ultricies consequat eros,nec scelerisque magna imperdiet metus.", + ) } /// Create sample file with provided content diff --git a/src/utils/ui.rs b/src/utils/ui.rs index c21917b..243ef8f 100644 --- a/src/utils/ui.rs +++ b/src/utils/ui.rs @@ -65,9 +65,9 @@ mod tests { fn test_utils_ui_draw_area_in() { let area: Rect = Rect::new(0, 0, 1024, 512); let child: Rect = Popup(Size::Percentage(75), Size::Percentage(30)).draw_in(area); - assert_eq!(child.x, 43); - assert_eq!(child.y, 63); - assert_eq!(child.width, 272); - assert_eq!(child.height, 55); + assert_eq!(child.x, 123); + assert_eq!(child.y, 179); + assert_eq!(child.width, 768); + assert_eq!(child.height, 154); } }