From 73ab597af36dd9a0db1d9e7626e15b3b7874bf9c Mon Sep 17 00:00:00 2001 From: Ilya fanyShu Date: Sun, 24 Nov 2024 15:09:41 +0100 Subject: [PATCH] [IT-23] upgrade dependencies and fix for clippy lint --- Cargo.lock | 32 ++++++++++++++--------------- Cargo.toml | 10 ++++----- README.md | 12 ++++++++--- examples/custom_bindings/Cargo.toml | 2 +- examples/fonts/Cargo.toml | 2 +- examples/full_screen/Cargo.toml | 2 +- examples/split_view/Cargo.toml | 2 +- examples/themes/Cargo.toml | 2 +- src/lib.rs | 2 +- src/subscription.rs | 1 - src/view.rs | 4 ++-- 11 files changed, 38 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ed6166c..e9cec56 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 = "ab_glyph" @@ -68,9 +68,9 @@ dependencies = [ [[package]] name = "alacritty_terminal" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db5ad9e2d4c1f7e17fccec9493eeb4e9c1f00e1167519d3940272b708ed8a069" +checksum = "52b9241459831fee2f22fcda52ddaf9e449b6627334a0f40f13a1b3344018060" dependencies = [ "base64", "bitflags 2.4.1", @@ -87,7 +87,7 @@ dependencies = [ "signal-hook", "unicode-width", "vte", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -134,9 +134,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "approx" @@ -873,7 +873,7 @@ checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" [[package]] name = "custom_bindings" -version = "0.5.0" +version = "0.5.1" dependencies = [ "iced", "iced_term", @@ -1212,7 +1212,7 @@ dependencies = [ [[package]] name = "fonts" -version = "0.5.0" +version = "0.5.1" dependencies = [ "iced", "iced_term", @@ -1262,7 +1262,7 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "full_screen" -version = "0.5.0" +version = "0.5.1" dependencies = [ "iced", "iced_term", @@ -1717,7 +1717,7 @@ dependencies = [ [[package]] name = "iced_term" -version = "0.5.0" +version = "0.5.1" dependencies = [ "alacritty_terminal", "anyhow", @@ -2372,9 +2372,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "open" -version = "5.3.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" +checksum = "3ecd52f0b8d15c40ce4820aa251ed5de032e5d91fab27f7db2f40d42a8bdf69c" dependencies = [ "is-wsl", "libc", @@ -3234,7 +3234,7 @@ dependencies = [ [[package]] name = "split_view" -version = "0.5.0" +version = "0.5.1" dependencies = [ "iced", "iced_term", @@ -3324,7 +3324,7 @@ dependencies = [ [[package]] name = "themes" -version = "0.5.0" +version = "0.5.1" dependencies = [ "iced", "iced_term", @@ -3405,9 +3405,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", diff --git a/Cargo.toml b/Cargo.toml index 9344b2b..eee9b1a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,14 +5,14 @@ members = ["examples/*"] name = "iced_term" description = "Terminal emulator widget powered by ICED framework and alacritty terminal backend." authors = ["Ilya Shvyryalkin "] -version = "0.5.0" +version = "0.5.1" edition = "2021" repository = "https://github.com/Harzu/iced_term" categories = ["gui"] license = "MIT" [dependencies] -alacritty_terminal = "0.24.0" +alacritty_terminal = "0.24.1" iced = { version = "0.13.1", features = [ "smol", "tokio", @@ -21,8 +21,8 @@ iced = { version = "0.13.1", features = [ "lazy", "advanced", ] } -tokio = { version = "1.40.0", features = ["full"] } +tokio = { version = "1.41.1", features = ["full"] } iced_graphics = "0.13.0" iced_core = "0.13.2" -open = "5.3.0" -anyhow = "1.0.89" +open = "5.3.1" +anyhow = "1.0.93" diff --git a/README.md b/README.md index b9aea44..6ce43a6 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ This widget was tested on MacOS, Linux and Windows (but only under [WSL2](https: From crates.io ```toml -iced_term = "0.5.0" +iced_term = "0.5.1" ``` From git @@ -224,11 +224,17 @@ You can also look at [examples](./examples) directory for more information about - [themes](./examples/themes/) - The example that show how you can change terminal color scheme. - [fonts](./examples/fonts/) - The examples that show how you can change font type or font size in your terminal emulator app. +You can run any example via + +```shell +cargo run --package +``` + ## Dependencies - [iced (0.13.1)](https://github.com/iced-rs/iced/tree/master) - - [alacritty_terminal (0.24.0)](https://github.com/alacritty/alacritty/tree/master/alacritty_terminal) - - [tokio (1.40.0)](https://github.com/tokio-rs/tokio) + - [alacritty_terminal (0.24.1)](https://github.com/alacritty/alacritty/tree/master/alacritty_terminal) + - [tokio (1.41.1)](https://github.com/tokio-rs/tokio) ## Contributing / Feedback diff --git a/examples/custom_bindings/Cargo.toml b/examples/custom_bindings/Cargo.toml index 1fa1927..eabd0df 100644 --- a/examples/custom_bindings/Cargo.toml +++ b/examples/custom_bindings/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "custom_bindings" -version = "0.5.0" +version = "0.5.1" edition = "2021" publish = false diff --git a/examples/fonts/Cargo.toml b/examples/fonts/Cargo.toml index 2b14286..896b8a5 100644 --- a/examples/fonts/Cargo.toml +++ b/examples/fonts/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fonts" -version = "0.5.0" +version = "0.5.1" edition = "2021" publish = false diff --git a/examples/full_screen/Cargo.toml b/examples/full_screen/Cargo.toml index 7aa3a6c..95e6ee0 100644 --- a/examples/full_screen/Cargo.toml +++ b/examples/full_screen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "full_screen" -version = "0.5.0" +version = "0.5.1" edition = "2021" publish = false diff --git a/examples/split_view/Cargo.toml b/examples/split_view/Cargo.toml index 1b986b4..7169ab0 100644 --- a/examples/split_view/Cargo.toml +++ b/examples/split_view/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "split_view" -version = "0.5.0" +version = "0.5.1" edition = "2021" [dependencies] diff --git a/examples/themes/Cargo.toml b/examples/themes/Cargo.toml index 3c24995..f0ed464 100644 --- a/examples/themes/Cargo.toml +++ b/examples/themes/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "themes" -version = "0.5.0" +version = "0.5.1" edition = "2021" publish = false diff --git a/src/lib.rs b/src/lib.rs index 44b16e9..2461ca8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,8 +9,8 @@ mod terminal; mod theme; mod view; -pub use alacritty_terminal::term::TermMode; pub use alacritty_terminal::event::Event as AlacrittyEvent; +pub use alacritty_terminal::term::TermMode; pub use subscription::Subscription; pub use terminal::{Command, Event, Terminal}; pub use theme::{ColorPalette, Theme}; diff --git a/src/subscription.rs b/src/subscription.rs index 26492af..83cc555 100644 --- a/src/subscription.rs +++ b/src/subscription.rs @@ -44,7 +44,6 @@ impl Subscription { }); }, None => { - println!("None"); if !shutdown { panic!("iced_term stream {}: terminal event channel closed unexpected", term_id); } diff --git a/src/view.rs b/src/view.rs index bfc2dfd..79b1510 100644 --- a/src/view.rs +++ b/src/view.rs @@ -26,7 +26,7 @@ pub struct TerminalView<'a> { } impl<'a> TerminalView<'a> { - pub fn show(term: &'a Terminal) -> Element<'_, Event> { + pub fn show(term: &'a Terminal) -> Element<'a, Event> { container(Self { term }) .width(Length::Fill) .height(Length::Fill) @@ -368,7 +368,7 @@ impl<'a> TerminalView<'a> { } } -impl<'a> Widget for TerminalView<'a> { +impl Widget for TerminalView<'_> { fn size(&self) -> Size { Size { width: Length::Fill,