From e62893ce7671752ff0b626eb02336784f00d95f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dahlb=C3=A6k?= <30782351+dahlbaek@users.noreply.github.com> Date: Mon, 20 May 2024 02:03:34 +0200 Subject: [PATCH] Reduce rust-version to 1.71.1 Only a minor change is needed in order to support rustc 1.71.1. Since this is the version of rust currently packaged by Debian trixie, it is nice for distro packagers if that version can be supported out of the box. --- Cargo.toml | 2 +- src/lib.rs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 58e170e..768235f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ name = "vec1" readme = "./README.md" repository = "https://github.com/rustonaut/vec1/" edition = "2021" -rust-version = "1.74" +rust-version = "1.71.1" [features] default = ["std"] diff --git a/src/lib.rs b/src/lib.rs index 644e024..ee4e0c7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -756,7 +756,8 @@ where if N == 0 { Err(Size0Error) } else { - Ok(Self(value.into())) + // TODO: as_slice can be removed when MSRV is bumped to 1.74 + Ok(Self(value.as_slice().into())) } } } @@ -771,7 +772,8 @@ where if N == 0 { Err(Size0Error) } else { - Ok(Self(value.into())) + // TODO: as_slice can be removed when MSRV is bumped to 1.74 + Ok(Self(value.as_slice().into())) } } }