From 86b07043275b2bd7816ed87b6c53855855a8c6f7 Mon Sep 17 00:00:00 2001 From: Valerio Besozzi Date: Fri, 12 Jan 2024 17:22:34 +0100 Subject: [PATCH] Bump termion version --- Cargo.lock | 86 ++++++++++++++++++++++------------------------------- Cargo.toml | 4 +-- src/main.rs | 5 ++-- 3 files changed, 41 insertions(+), 54 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c84fadb..4ac6a2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,12 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -23,6 +29,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + [[package]] name = "bumpalo" version = "3.12.1" @@ -43,17 +55,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", - "time", "wasm-bindgen", - "winapi", + "windows-targets", ] [[package]] @@ -155,6 +166,17 @@ version = "0.2.142" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" +[[package]] +name = "libredox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall", +] + [[package]] name = "link-cplusplus" version = "1.0.8" @@ -173,16 +195,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "num-integer" -version = "0.1.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" -dependencies = [ - "autocfg", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.8" @@ -224,31 +236,22 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.56" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" - -[[package]] -name = "redox_syscall" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] name = "redox_termios" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -dependencies = [ - "redox_syscall 0.1.56", -] +checksum = "20145670ba436b55d91fc92d25e71160fbfbdd57831631c8d7d36377a476f1cb" [[package]] name = "rsclock" -version = "0.1.10" +version = "0.1.11" dependencies = [ "chrono", "termion", @@ -293,27 +296,16 @@ dependencies = [ [[package]] name = "termion" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659c1f379f3408c7e5e84c7d0da6d93404e3800b6b9d063ba24436419302ec90" +checksum = "417813675a504dfbbf21bfde32c03e5bf9f2413999962b479023c02848c1c7a5" dependencies = [ "libc", + "libredox", "numtoa", - "redox_syscall 0.2.11", "redox_termios", ] -[[package]] -name = "time" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" -dependencies = [ - "libc", - "wasi", - "winapi", -] - [[package]] name = "unicode-ident" version = "1.0.8" @@ -326,12 +318,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasm-bindgen" version = "0.2.84" diff --git a/Cargo.toml b/Cargo.toml index 50efa0e..ac654fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rsclock" -version = "0.1.10" +version = "0.1.11" authors = ["valebes"] edition = "2021" @@ -25,5 +25,5 @@ codegen-units = 1 panic = 'abort' [dependencies] -termion = "2.0.1" +termion = "3.0.0" chrono = "0.4.31" diff --git a/src/main.rs b/src/main.rs index cf50815..09abbac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -154,6 +154,7 @@ const M: [[bool; 6]; 5] = [ extern crate chrono; extern crate termion; +use std::os::fd::AsFd; use chrono::prelude::*; use termion::{async_stdin, clear, color, cursor, raw::IntoRawMode, raw::RawTerminal}; @@ -170,7 +171,7 @@ use std::process; /* Functions */ -fn resize_watcher(size: (u16, u16), stdout: &mut RawTerminal) -> bool { +fn resize_watcher(size: (u16, u16), stdout: &mut RawTerminal) -> bool { if size != termion::terminal_size().unwrap() { write!(stdout, "{}", clear::All).unwrap(); true @@ -232,7 +233,7 @@ fn help(nm: &String) { process::exit(1); } -fn draw( +fn draw( hour: Vec<[[bool; 6]; 5]>, sym: String, mut pos_x: u16,