diff --git a/Cargo.toml b/Cargo.toml index 711f657..e600bc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" description = "Reading bit sequences from a byte slice" license = "MIT OR Apache-2.0" repository = "https://codeberg.org/icewind/bitbuffer" -rust-version = "1.74.0" +rust-version = "1.82.0" [dependencies] num-traits = "0.2.19" diff --git a/bitbuffer_derive/src/params/mod.rs b/bitbuffer_derive/src/params/mod.rs index 40cf51f..bdb4d31 100644 --- a/bitbuffer_derive/src/params/mod.rs +++ b/bitbuffer_derive/src/params/mod.rs @@ -237,7 +237,9 @@ impl InputParams { } } - pub fn generics_for_impl(&self) -> (ImplGenerics, TypeGenerics, Option<&WhereClause>) { + pub fn generics_for_impl<'a>( + &'a self, + ) -> (ImplGenerics<'a>, TypeGenerics<'a>, Option<&'a WhereClause>) { // we need these separate generics to only add out Endianness param to the 'impl' let (_, ty_generics, where_clause) = self.generics.split_for_impl(); let (impl_generics, _, _) = self.generics_with_endianness.split_for_impl(); diff --git a/flake.lock b/flake.lock index dba2126..43b8e59 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "crane": { "locked": { - "lastModified": 1751562746, - "narHash": "sha256-smpugNIkmDeicNz301Ll1bD7nFOty97T79m4GUMUczA=", + "lastModified": 1780099841, + "narHash": "sha256-EVZd2RsbpreRUDSi9rBwPY+ZxoyMaiEBbZxxhljbaS4=", "owner": "ipetkov", "repo": "crane", - "rev": "aed2020fd3dc26e1e857d4107a5a67a33ab6c1fd", + "rev": "0532eb17955225173906d671fb36306bdeb1e2dc", "type": "github" }, "original": { @@ -22,11 +22,11 @@ ] }, "locked": { - "lastModified": 1752106289, - "narHash": "sha256-BC4hWjDDNVmRLvBFCHz7oKiapf1ndBRXPDNle/H+6e8=", + "lastModified": 1785163537, + "narHash": "sha256-TP11bcL6YwemrsMbL7fNJziOyysTverEr/LbKrPXE64=", "owner": "nix-community", "repo": "flakelight", - "rev": "0c7170f19b170882f167a71cad1124714ffc192e", + "rev": "737e3235669d7ea9be199dfd045f808be02207b2", "type": "github" }, "original": { @@ -44,11 +44,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1752438127, - "narHash": "sha256-1NKLbztqg0/sYUhZgxus+WJU+jZThkV+pga/kqjB3/A=", + "lastModified": 1780231986, + "narHash": "sha256-OyafczPtzE0Xa2zl3j/KvV2+ZVYGhYQHt0MOVWtDXlY=", "ref": "refs/heads/main", - "rev": "31877680aa6d391e59a598d35081e24b4316ab9a", - "revCount": 60, + "rev": "f5cbda29b945df03256bf63c22fa4cd5fa429e67", + "revCount": 72, "type": "git", "url": "https://codeberg.org/icewind/mill-scale.git" }, @@ -59,16 +59,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1752162966, - "narHash": "sha256-3MxxkU8ZXMHXcbFz7UE4M6qnIPTYGcE/7EMqlZNnVDE=", + "lastModified": 1785491804, + "narHash": "sha256-p00vplVOyfKGlhju0+eGGPAxyYYKaY0lpyuoHLFIx2Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "10e687235226880ed5e9f33f1ffa71fe60f2638a", + "rev": "5b4f72e1705a63aace42900610c4db82cb4af0ec", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-25.05", + "ref": "nixos-26.05", "type": "indirect" } }, @@ -88,11 +88,11 @@ ] }, "locked": { - "lastModified": 1752374969, - "narHash": "sha256-Ky3ynEkJXih7mvWyt9DWoiSiZGqPeHLU1tlBU4b0mcc=", + "lastModified": 1780197589, + "narHash": "sha256-FVCr2Ij/jKf59a4LW481eeOF6rJRreOBrVgW/aUBTrw=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "75fb000638e6d0f57cb1e8b7a4550cbdd8c76f1d", + "rev": "21632e942d89bf1cce4e5a63d7e58a215a0cbfcc", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 8c4f9cb..83af6d2 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ { inputs = { - nixpkgs.url = "nixpkgs/nixos-25.05"; + nixpkgs.url = "nixpkgs/nixos-26.05"; flakelight = { url = "github:nix-community/flakelight"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/tests/write_tests.rs b/tests/write_tests.rs index 6860363..2909f46 100644 --- a/tests/write_tests.rs +++ b/tests/write_tests.rs @@ -304,7 +304,7 @@ fn test_write_all_lengths_ty< let buffer = BitReadBuffer::new(&bytes, BigEndian); let mut reader = BitReadStream::new(buffer); - for (bits, expected_value) in (1..max_bits).zip(expected.into_iter()) { + for (bits, expected_value) in (1..max_bits).zip(expected) { let actual = reader.read_int::(bits).unwrap(); assert_eq!( expected_value,