Skip to content

Commit

Permalink
Bump MSRV to 1.56.0 and update windows-sys to 0.52 (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
barrbrain authored Jan 9, 2024
1 parent 9d16b40 commit c17fda2
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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: |
Expand Down Expand Up @@ -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 }}
Expand All @@ -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
Expand All @@ -152,6 +152,6 @@ jobs:
toolchain: nightly
override: true
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Test
run: make test
2 changes: 1 addition & 1 deletion .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/minver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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",
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions src/unix_term.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -81,7 +80,7 @@ pub fn read_secure() -> io::Result<String> {
}
};

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;
Expand Down Expand Up @@ -125,7 +124,7 @@ fn select_fd(fd: i32, timeout: i32) -> io::Result<bool> {

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 _,
Expand All @@ -139,8 +138,8 @@ fn select_fd(fd: i32, timeout: i32) -> io::Result<bool> {
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 {
Expand Down

0 comments on commit c17fda2

Please sign in to comment.