Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uses old release of arrayvecin test #88

Open
jonassmedegaard opened this issue May 15, 2022 · 0 comments
Open

uses old release of arrayvecin test #88

jonassmedegaard opened this issue May 15, 2022 · 0 comments
Labels

Comments

@jonassmedegaard
Copy link

This project dev-depends on arrayvec ~0.5.1.

The 0.5 branch of arrayvec was last updated more than a year ago, and newer branches has seen 5 newer releases, latest 7 months ago.

Please consider switching to newest branch 0.7 of arrayvec.

While at it, please consider simplifying the version notation in Cargo.lock to drop superfluous leading ~ which is implied with 0.x versions.

The API changed between 0.5 and 0.7 - here is the patch that I carry for the packaging of this project in Debian (where only v0.7 branch of arrayvec is available, triggering my investigation into this issue).

Since the patch is tiny, here it is inline as well:

Description: update code to use newer release of crate arrayvec
 Also, simplify notation (leading `~` is implied for v0.x).
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2022-05-15
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -30,7 +30,7 @@
 bincode = "1.2.1"
 
   [dev-dependencies.arrayvec]
-  version = "~0.5.1"
+  version = "0.7"
   default-features = false
 
   [dev-dependencies.rand]
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -84,7 +84,7 @@
 #[cfg(test)]
 macro_rules! format {
     ($capacity:expr, $($arg:tt)*) => {{
-        let mut output = arrayvec::ArrayString::<[_; $capacity]>::new();
+        let mut output = arrayvec::ArrayString::<$capacity>::new();
         core::fmt::write(&mut output, core::format_args!($($arg)*)).expect("insufficient ArrayString capacity");
         output
     }}

(sorry, I won't provide a pull request for political reasons: I will not push git code to github due to their questionable terms of service that arguably implicitly grants Microsoft a weaker-than-copyleft license)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant