diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8b36960..2821c238 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,17 +6,17 @@ on: branches: [master] jobs: build-msrv: - name: Build on MSRV (1.48) + name: Build on MSRV (1.56) strategy: fail-fast: false matrix: include: - os: ubuntu-latest target: x86_64-unknown-linux-gnu - rust: 1.48.0 + rust: 1.56.0 - os: windows-latest target: i686-pc-windows-msvc - rust: 1.48.0 + rust: 1.56.0 runs-on: ${{ matrix.os }} steps: - name: Install rust @@ -46,16 +46,16 @@ jobs: rust: stable - os: ubuntu-latest target: x86_64-unknown-linux-gnu - rust: 1.51.0 + rust: 1.56.0 - os: ubuntu-latest target: i686-unknown-linux-gnu - rust: 1.51.0 + rust: 1.56.0 - os: windows-latest target: i686-pc-windows-msvc - rust: 1.51.0 + rust: 1.56.0 - os: windows-latest target: x86_64-pc-windows-msvc - rust: 1.51.0 + rust: 1.56.0 - os: ubuntu-latest target: x86_64-unknown-linux-gnu rust: stable @@ -72,7 +72,7 @@ jobs: target: ${{ matrix.target }} override: true - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install linker if: matrix.target == 'i686-unknown-linux-gnu' run: | @@ -108,7 +108,7 @@ jobs: target: ${{ matrix.target }} override: true - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check env: CARGO_BUILD_TARGET: ${{ matrix.target }} @@ -129,7 +129,7 @@ jobs: target: ${{ matrix.target }} override: true - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install WasmTime run: | curl https://wasmtime.dev/install.sh -sSf | bash @@ -152,6 +152,6 @@ jobs: toolchain: nightly override: true - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Test run: make test diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index d86db79e..deb4a1d7 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: toolchain: stable diff --git a/.github/workflows/minver.yml b/.github/workflows/minver.yml index ac590604..68e5e73d 100644 --- a/.github/workflows/minver.yml +++ b/.github/workflows/minver.yml @@ -9,7 +9,7 @@ jobs: continue-on-error: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: toolchain: nightly diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml index e803f5b3..aaa843cf 100644 --- a/.github/workflows/rustfmt.yml +++ b/.github/workflows/rustfmt.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: toolchain: stable diff --git a/Cargo.toml b/Cargo.toml index b9a577eb..a62d879c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ homepage = "https://github.com/console-rs/console" repository = "https://github.com/console-rs/console" documentation = "https://docs.rs/console" readme = "README.md" -rust-version = "1.48.0" +rust-version = "1.56.0" [features] default = ["unicode-width", "ansi-parsing"] @@ -26,7 +26,7 @@ lazy_static = "1.4.0" encode_unicode = "0.3" [target.'cfg(windows)'.dependencies.windows-sys] -version = "0.48.0" +version = "0.52.0" features = [ "Win32_Foundation", "Win32_System_Console", diff --git a/Makefile b/Makefile index ccab99dd..b779cf41 100644 --- a/Makefile +++ b/Makefile @@ -35,5 +35,6 @@ lint: msrv-lock: @cargo update -p proptest --precise=1.0.0 + @cargo update -p byteorder --precise=1.4.0 .PHONY: all doc build check test format format-check lint check-minver msrv-lock diff --git a/README.md b/README.md index 9a046d85..0a04eb07 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Build Status](https://github.com/console-rs/console/workflows/CI/badge.svg?branch=master)](https://github.com/console-rs/console/actions?query=workflow%3ACI) [![Crates.io](https://img.shields.io/crates/d/console.svg)](https://crates.io/crates/console) [![License](https://img.shields.io/github/license/console-rs/console)](https://github.com/console-rs/console/blob/master/LICENSE) -[![rustc 1.48.0](https://img.shields.io/badge/rust-1.48%2B-orange.svg)](https://img.shields.io/badge/rust-1.48%2B-orange.svg) +[![rustc 1.56.0](https://img.shields.io/badge/rust-1.56%2B-orange.svg)](https://img.shields.io/badge/rust-1.56%2B-orange.svg) [![Documentation](https://docs.rs/console/badge.svg)](https://docs.rs/console) **console** is a library for Rust that provides access to various terminal diff --git a/src/unix_term.rs b/src/unix_term.rs index 77623e34..271709f2 100644 --- a/src/unix_term.rs +++ b/src/unix_term.rs @@ -5,7 +5,6 @@ use std::io; use std::io::{BufRead, BufReader}; use std::mem; use std::os::unix::io::AsRawFd; -use std::ptr; use std::str; use crate::kb::Key; @@ -50,7 +49,7 @@ pub fn terminal_size(out: &Term) -> Option<(u16, u16)> { return None; } - let mut winsize: libc::winsize = std::mem::zeroed(); + let mut winsize: libc::winsize = mem::zeroed(); // FIXME: ".into()" used as a temporary fix for a libc bug // https://github.com/rust-lang/libc/pull/704 @@ -81,7 +80,7 @@ pub fn read_secure() -> io::Result { } }; - let mut termios = core::mem::MaybeUninit::uninit(); + let mut termios = mem::MaybeUninit::uninit(); c_result(|| unsafe { libc::tcgetattr(fd, termios.as_mut_ptr()) })?; let mut termios = unsafe { termios.assume_init() }; let original = termios; @@ -125,7 +124,7 @@ fn select_fd(fd: i32, timeout: i32) -> io::Result { let mut timeout_val; let timeout = if timeout < 0 { - ptr::null_mut() + std::ptr::null_mut() } else { timeout_val = libc::timeval { tv_sec: (timeout / 1000) as _, @@ -139,8 +138,8 @@ fn select_fd(fd: i32, timeout: i32) -> io::Result { let ret = libc::select( fd + 1, &mut read_fd_set, - ptr::null_mut(), - ptr::null_mut(), + std::ptr::null_mut(), + std::ptr::null_mut(), timeout, ); if ret < 0 {