From 25362d273f41f0cfd77b7df47eddfd21509ac91b Mon Sep 17 00:00:00 2001 From: Remigiusz Micielski Date: Thu, 4 Jul 2024 09:44:24 +0200 Subject: [PATCH] chore: update dependencies --- Cargo.lock | 127 ++++++++++--------- Cargo.toml | 12 +- rm-main/src/ui/global_popups/error.rs | 4 +- rm-main/src/ui/global_popups/help.rs | 4 +- rm-main/src/ui/tabs/search.rs | 5 +- rm-main/src/ui/tabs/torrents/popups/files.rs | 5 +- rm-main/src/ui/tabs/torrents/popups/stats.rs | 5 +- 7 files changed, 87 insertions(+), 75 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 14a514d..cc26bd3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -206,9 +206,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.103" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2755ff20a1d93490d26ba33a6f092a38a508398a5320df5d4b3014fcccce9410" +checksum = "74b6a57f98764a267ff415d50a25e6e166f3831a5071af4995296ea97d210490" [[package]] name = "cfg-if" @@ -753,9 +753,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "c4fe55fb7a772d59a5ff1dfbff4fe0258d19b89fec4b233e75d35d5d2316badc" dependencies = [ "bytes", "futures-channel", @@ -793,7 +793,7 @@ checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.3.1", + "hyper 1.4.0", "hyper-util", "rustls 0.23.10", "rustls-pki-types", @@ -811,7 +811,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.0", "hyper-util", "native-tls", "tokio", @@ -821,16 +821,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.0", - "hyper 1.3.1", + "hyper 1.4.0", "pin-project-lite", "socket2", "tokio", @@ -886,6 +886,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -940,14 +949,15 @@ dependencies = [ [[package]] name = "magnetease" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "407cf491f33980277c2ccfda249b4aaa8dbfc05a20ec72ed3d9dd8f3157c40e8" +checksum = "e5f848923411219c52ef3ada5c6d9a7ef295064ef7e9b14cb7b891d2b0c61797" dependencies = [ "async-trait", "reqwest 0.12.5", "serde", "serde_json", + "thiserror", "tokio", ] @@ -1095,7 +1105,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1261,20 +1271,21 @@ dependencies = [ [[package]] name = "ratatui" -version = "0.26.3" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f44c9e68fd46eda15c646fbb85e1040b657a58cdc8c98db1d97a55930d991eef" +checksum = "d16546c5b5962abf8ce6e2881e722b4e0ae3b6f1a08a26ae3573c55853ca68d3" dependencies = [ "bitflags 2.6.0", "cassowary", "compact_str", "crossterm", - "itertools", + "itertools 0.13.0", "lru", "paste", "serde", "stability", "strum", + "strum_macros", "unicode-segmentation", "unicode-truncate", "unicode-width", @@ -1374,7 +1385,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.0", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.0", "hyper-rustls 0.27.2", "hyper-tls", "hyper-util", @@ -1502,7 +1513,7 @@ dependencies = [ "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.4", + "rustls-webpki 0.102.5", "subtle", "zeroize", ] @@ -1544,9 +1555,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" dependencies = [ "ring", "rustls-pki-types", @@ -1661,9 +1672,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.118" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -1901,9 +1912,9 @@ dependencies = [ [[package]] name = "throbber-widgets-tui" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "431b847a60fc7b1df94a5b1bcb3cdd7027bb0013b431b08038505e8891c577a2" +checksum = "685391f5e78b08989c1014f5a0edddf6751e0726b6a8dd1bdcc98d05921b19b6" dependencies = [ "rand", "ratatui", @@ -2108,9 +2119,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tui-input" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e785f863a3af4c800a2a669d0b64c879b538738e352607e2624d03f868dc01" +checksum = "9b02e86628a225c39b2602863f244a01668184149928ceb410e47a8022d7597e" dependencies = [ "crossterm", "unicode-width", @@ -2118,9 +2129,9 @@ dependencies = [ [[package]] name = "tui-tree-widget" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6201de8ad8d88cb6cac4cfe3436d9a1ea31c0732a7aec4c2cc3b23186ad7dcc" +checksum = "0ac69db35529be6a75f9d27516ff33df299e2e8e961a1986d52185cef0427352" dependencies = [ "ratatui", "unicode-width", @@ -2159,7 +2170,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5fbabedabe362c618c714dbefda9927b5afc8e2a8102f47f081089a9019226" dependencies = [ - "itertools", + "itertools 0.12.1", "unicode-width", ] @@ -2348,7 +2359,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -2368,18 +2379,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -2390,9 +2401,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -2402,9 +2413,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -2414,15 +2425,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -2432,9 +2443,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -2444,9 +2455,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -2456,9 +2467,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -2468,9 +2479,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -2509,18 +2520,18 @@ checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index a71ada2..9aef960 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,9 +20,9 @@ rm-shared = { version = "0.3", path = "rm-shared" } magnetease = "0.1" anyhow = "1" serde = { version = "1", features = ["derive"] } -transmission-rpc = "0.4.2" +transmission-rpc = "0.4" fuzzy-matcher = "0.3.7" -clap = { version = "4.5.6", features = ["derive"] } +clap = { version = "4", features = ["derive"] } base64 = "0.22" xdg = "2.5" url = { version = "2.5", features = ["serde"] } @@ -39,10 +39,10 @@ futures = "0.3" # TUI crossterm = { version = "0.27", features = ["event-stream", "serde"] } -ratatui = { version = "0.26", features = ["serde"] } -tui-input = "0.8" -tui-tree-widget = "0.20" -throbber-widgets-tui = "0.5.0" +ratatui = { version = "0.27", features = ["serde"] } +tui-input = "0.9" +tui-tree-widget = "0.21" +throbber-widgets-tui = "0.6.0" # Config for 'cargo dist' [workspace.metadata.dist] diff --git a/rm-main/src/ui/global_popups/error.rs b/rm-main/src/ui/global_popups/error.rs index faf0ec1..dbb9d49 100644 --- a/rm-main/src/ui/global_popups/error.rs +++ b/rm-main/src/ui/global_popups/error.rs @@ -33,8 +33,8 @@ impl Component for ErrorPopup { fn render(&mut self, f: &mut Frame, _rect: Rect) { let centered_rect = centered_rect(f.size(), 50, 50); - let popup_rect = centered_rect.inner(&Margin::new(1, 1)); - let text_rect = popup_rect.inner(&Margin::new(3, 2)); + let popup_rect = centered_rect.inner(Margin::new(1, 1)); + let text_rect = popup_rect.inner(Margin::new(3, 2)); let button_rect = Layout::vertical([Constraint::Percentage(100), Constraint::Length(1)]) .split(text_rect)[1]; diff --git a/rm-main/src/ui/global_popups/help.rs b/rm-main/src/ui/global_popups/help.rs index 71d003b..c2e2ff0 100644 --- a/rm-main/src/ui/global_popups/help.rs +++ b/rm-main/src/ui/global_popups/help.rs @@ -64,8 +64,8 @@ impl Component for HelpPopup { fn render(&mut self, f: &mut Frame, rect: Rect) { let centered_rect = centered_rect(rect, 75, 75); - let popup_rect = centered_rect.inner(&Margin::new(1, 1)); - let text_rect = popup_rect.inner(&Margin::new(3, 2)); + let popup_rect = centered_rect.inner(Margin::new(1, 1)); + let text_rect = popup_rect.inner(Margin::new(3, 2)); let title_style = Style::new().fg(self.ctx.config.general.accent_color); let block = Block::bordered() diff --git a/rm-main/src/ui/tabs/search.rs b/rm-main/src/ui/tabs/search.rs index be53710..8502690 100644 --- a/rm-main/src/ui/tabs/search.rs +++ b/rm-main/src/ui/tabs/search.rs @@ -4,7 +4,7 @@ use std::{ }; use crossterm::event::{KeyCode, KeyEvent}; -use magnetease::{magnetease::Magnetease, Magnet}; +use magnetease::{Magnet, Magnetease}; use ratatui::{ layout::Flex, prelude::*, @@ -59,14 +59,13 @@ impl SearchTab { .unwrap() .searching(Arc::new(Mutex::new(ThrobberState::default()))); ctx_clone.send_action(Action::Render); - let res = magnetease.search(&search_phrase).await; + let res = magnetease.search(&search_phrase).await.unwrap(); if res.is_empty() { search_result_info_clone.lock().unwrap().not_found(); } else { search_result_info_clone.lock().unwrap().found(res.len()); } - // TODO: add an X icon if no results, else V when results table_clone.lock().unwrap().set_items(res); ctx_clone.send_action(Action::Render); } diff --git a/rm-main/src/ui/tabs/torrents/popups/files.rs b/rm-main/src/ui/tabs/torrents/popups/files.rs index 7806fce..c8da5b2 100644 --- a/rm-main/src/ui/tabs/torrents/popups/files.rs +++ b/rm-main/src/ui/tabs/torrents/popups/files.rs @@ -6,6 +6,7 @@ use std::{ use ratatui::{ prelude::*, + style::Styled, widgets::{ block::{Position, Title}, Block, BorderType, Clear, Paragraph, @@ -196,9 +197,9 @@ impl Component for FilesPopup { fn render(&mut self, f: &mut Frame, rect: Rect) { let popup_rect = centered_rect(rect, 75, 75); - let block_rect = popup_rect.inner(&Margin::new(1, 0)); + let block_rect = popup_rect.inner(Margin::new(1, 0)); - let info_text_rect = block_rect.inner(&Margin::new(3, 2)); + let info_text_rect = block_rect.inner(Margin::new(3, 2)); let highlight_style = Style::default().fg(self.ctx.config.general.accent_color); let bold_highlight_style = highlight_style.on_black().bold(); diff --git a/rm-main/src/ui/tabs/torrents/popups/stats.rs b/rm-main/src/ui/tabs/torrents/popups/stats.rs index 3c02123..07d8599 100644 --- a/rm-main/src/ui/tabs/torrents/popups/stats.rs +++ b/rm-main/src/ui/tabs/torrents/popups/stats.rs @@ -1,5 +1,6 @@ use ratatui::{ prelude::*, + style::Styled, widgets::{ block::{Position, Title}, Block, BorderType, Clear, Paragraph, @@ -37,8 +38,8 @@ impl Component for StatisticsPopup { fn render(&mut self, f: &mut Frame, rect: Rect) { let popup_rect = centered_rect(rect, 50, 50); - let block_rect = popup_rect.inner(&Margin::new(1, 1)); - let text_rect = block_rect.inner(&Margin::new(3, 2)); + let block_rect = popup_rect.inner(Margin::new(1, 1)); + let text_rect = block_rect.inner(Margin::new(3, 2)); let title_style = Style::default().fg(self.ctx.config.general.accent_color); let block = Block::bordered()