Skip to content

Commit

Permalink
Bump termion version
Browse files Browse the repository at this point in the history
  • Loading branch information
valebes committed Jan 12, 2024
1 parent 09592f4 commit 86b0704
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 54 deletions.
86 changes: 36 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rsclock"
version = "0.1.10"
version = "0.1.11"
authors = ["valebes"]
edition = "2021"

Expand All @@ -25,5 +25,5 @@ codegen-units = 1
panic = 'abort'

[dependencies]
termion = "2.0.1"
termion = "3.0.0"
chrono = "0.4.31"
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -170,7 +171,7 @@ use std::process;

/* Functions */

fn resize_watcher<W: Write>(size: (u16, u16), stdout: &mut RawTerminal<W>) -> bool {
fn resize_watcher<W: Write + AsFd>(size: (u16, u16), stdout: &mut RawTerminal<W>) -> bool {
if size != termion::terminal_size().unwrap() {
write!(stdout, "{}", clear::All).unwrap();
true
Expand Down Expand Up @@ -232,7 +233,7 @@ fn help(nm: &String) {
process::exit(1);
}

fn draw<W: Write>(
fn draw<W: Write + AsFd>(
hour: Vec<[[bool; 6]; 5]>,
sym: String,
mut pos_x: u16,
Expand Down

0 comments on commit 86b0704

Please sign in to comment.