Skip to content

Commit 3caff3e

Browse files
committed
Bump MSRV to 1.74
1 parent 4a2443e commit 3caff3e

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ jobs:
4545
use_cross: true
4646
- os: ubuntu-latest
4747
target: x86_64-unknown-linux-gnu
48-
# TODO: Enable it back
49-
# - os: windows-latest
50-
# target: i686-pc-windows-gnu
48+
# TODO: Enable it back
49+
# - os: windows-latest
50+
# target: i686-pc-windows-gnu
5151
- os: windows-latest
5252
target: i686-pc-windows-msvc
5353
use_cross: true
@@ -62,7 +62,7 @@ jobs:
6262
- name: Install Rust toolchain
6363
uses: dtolnay/rust-toolchain@master
6464
with:
65-
toolchain: 1.67.0
65+
toolchain: 1.74
6666
targets: ${{ matrix.target }}
6767
- uses: taiki-e/install-action@v2
6868
with:
@@ -132,7 +132,7 @@ jobs:
132132
- name: Install Rust toolchain
133133
uses: dtolnay/rust-toolchain@master
134134
with:
135-
toolchain: 1.67.0
135+
toolchain: 1.74
136136
targets: ${{ matrix.target }}
137137
- uses: taiki-e/install-action@v2
138138
with:
@@ -160,7 +160,7 @@ jobs:
160160
- name: Install Rust toolchain
161161
uses: dtolnay/rust-toolchain@master
162162
with:
163-
toolchain: 1.67.0
163+
toolchain: 1.74
164164
targets: ${{ matrix.target }}
165165
- uses: taiki-e/install-action@v2
166166
with:
@@ -251,7 +251,7 @@ jobs:
251251
- name: Install Rust toolchain
252252
uses: dtolnay/rust-toolchain@master
253253
with:
254-
toolchain: 1.67.0
254+
toolchain: 1.74
255255
targets: ${{ matrix.target }}
256256
- uses: taiki-e/install-action@v2
257257
with:
@@ -281,7 +281,7 @@ jobs:
281281
- name: Install Rust toolchain
282282
uses: dtolnay/rust-toolchain@master
283283
with:
284-
toolchain: 1.67.0
284+
toolchain: 1.74
285285
targets: ${{ matrix.target }}
286286
- uses: taiki-e/install-action@v2
287287
with:

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repository = "https://github.com/svartalf/hostname"
1212
readme = "README.md"
1313
license = "MIT"
1414
edition = "2021"
15-
rust-version = "1.67"
15+
rust-version = "1.74"
1616

1717
[features]
1818
default = []

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
[![Latest Version](https://img.shields.io/crates/v/hostname.svg)](https://crates.io/crates/hostname)
44
[![Latest Version](https://docs.rs/hostname/badge.svg)](https://docs.rs/hostname)
55
[![Build Status](https://github.com/svartalf/hostname/actions/workflows/ci.yml/badge.svg)](https://github.com/svartalf/hostname/actions)
6-
![Minimum rustc version](https://img.shields.io/badge/rustc-1.67+-green.svg)
6+
![Minimum rustc version](https://img.shields.io/badge/rustc-1.71+-green.svg)
77
![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)
88
![Crates.io](https://img.shields.io/crates/d/hostname)
99

1010
> Cross-platform system's host name functions in Rust
1111
1212
## Supported platforms
1313

14-
* [POSIX-compliant](https://en.wikipedia.org/wiki/POSIX#POSIX-oriented_operating_systems) systems\
15-
(Linux, macOS, Android, FreeBSD, OpenBSD, NetBSD, Solaris, Redox, and so on)
16-
* Windows
14+
- [POSIX-compliant](https://en.wikipedia.org/wiki/POSIX#POSIX-oriented_operating_systems) systems\
15+
(Linux, macOS, Android, FreeBSD, OpenBSD, NetBSD, Solaris, Redox, and so on)
16+
- Windows
1717

1818
## Rust version requirements
1919

20-
Since version `0.4.0` this crate requires Rust version `1.67.0` or greater.
20+
Since version `0.4.0` this crate requires Rust version `1.74` or greater.
2121

2222
This version is explicitly tested in CI
2323
and may be bumped in any major or minor release as needed.\

src/nix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub fn set(hostname: &OsStr) -> io::Result<()> {
6969
#[allow(clippy::unnecessary_cast)]
7070
// Cast is needed for the `libc::c_int` type
7171
if hostname.len() > hostname_len_t::MAX as usize {
72-
return Err(io::Error::new(io::ErrorKind::Other, "hostname too long"));
72+
return Err(io::Error::other("hostname too long"));
7373
}
7474

7575
let size = hostname.len() as hostname_len_t;

0 commit comments

Comments
 (0)