mirror of
https://codeberg.org/icewind/bitbuffer.git
synced 2026-08-02 04:04:47 +02:00
flake update
This commit is contained in:
parent
a07123315c
commit
2492d6960c
5 changed files with 23 additions and 21 deletions
|
|
@ -6,7 +6,7 @@ edition = "2021"
|
||||||
description = "Reading bit sequences from a byte slice"
|
description = "Reading bit sequences from a byte slice"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
repository = "https://codeberg.org/icewind/bitbuffer"
|
repository = "https://codeberg.org/icewind/bitbuffer"
|
||||||
rust-version = "1.74.0"
|
rust-version = "1.82.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
num-traits = "0.2.19"
|
num-traits = "0.2.19"
|
||||||
|
|
|
||||||
|
|
@ -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'
|
// 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 (_, ty_generics, where_clause) = self.generics.split_for_impl();
|
||||||
let (impl_generics, _, _) = self.generics_with_endianness.split_for_impl();
|
let (impl_generics, _, _) = self.generics_with_endianness.split_for_impl();
|
||||||
|
|
|
||||||
34
flake.lock
generated
34
flake.lock
generated
|
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"crane": {
|
"crane": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1751562746,
|
"lastModified": 1780099841,
|
||||||
"narHash": "sha256-smpugNIkmDeicNz301Ll1bD7nFOty97T79m4GUMUczA=",
|
"narHash": "sha256-EVZd2RsbpreRUDSi9rBwPY+ZxoyMaiEBbZxxhljbaS4=",
|
||||||
"owner": "ipetkov",
|
"owner": "ipetkov",
|
||||||
"repo": "crane",
|
"repo": "crane",
|
||||||
"rev": "aed2020fd3dc26e1e857d4107a5a67a33ab6c1fd",
|
"rev": "0532eb17955225173906d671fb36306bdeb1e2dc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -22,11 +22,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1752106289,
|
"lastModified": 1785163537,
|
||||||
"narHash": "sha256-BC4hWjDDNVmRLvBFCHz7oKiapf1ndBRXPDNle/H+6e8=",
|
"narHash": "sha256-TP11bcL6YwemrsMbL7fNJziOyysTverEr/LbKrPXE64=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "flakelight",
|
"repo": "flakelight",
|
||||||
"rev": "0c7170f19b170882f167a71cad1124714ffc192e",
|
"rev": "737e3235669d7ea9be199dfd045f808be02207b2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -44,11 +44,11 @@
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1752438127,
|
"lastModified": 1780231986,
|
||||||
"narHash": "sha256-1NKLbztqg0/sYUhZgxus+WJU+jZThkV+pga/kqjB3/A=",
|
"narHash": "sha256-OyafczPtzE0Xa2zl3j/KvV2+ZVYGhYQHt0MOVWtDXlY=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "31877680aa6d391e59a598d35081e24b4316ab9a",
|
"rev": "f5cbda29b945df03256bf63c22fa4cd5fa429e67",
|
||||||
"revCount": 60,
|
"revCount": 72,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://codeberg.org/icewind/mill-scale.git"
|
"url": "https://codeberg.org/icewind/mill-scale.git"
|
||||||
},
|
},
|
||||||
|
|
@ -59,16 +59,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1752162966,
|
"lastModified": 1785491804,
|
||||||
"narHash": "sha256-3MxxkU8ZXMHXcbFz7UE4M6qnIPTYGcE/7EMqlZNnVDE=",
|
"narHash": "sha256-p00vplVOyfKGlhju0+eGGPAxyYYKaY0lpyuoHLFIx2Y=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "10e687235226880ed5e9f33f1ffa71fe60f2638a",
|
"rev": "5b4f72e1705a63aace42900610c4db82cb4af0ec",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-25.05",
|
"ref": "nixos-26.05",
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -88,11 +88,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1752374969,
|
"lastModified": 1780197589,
|
||||||
"narHash": "sha256-Ky3ynEkJXih7mvWyt9DWoiSiZGqPeHLU1tlBU4b0mcc=",
|
"narHash": "sha256-FVCr2Ij/jKf59a4LW481eeOF6rJRreOBrVgW/aUBTrw=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "75fb000638e6d0f57cb1e8b7a4550cbdd8c76f1d",
|
"rev": "21632e942d89bf1cce4e5a63d7e58a215a0cbfcc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-25.05";
|
nixpkgs.url = "nixpkgs/nixos-26.05";
|
||||||
flakelight = {
|
flakelight = {
|
||||||
url = "github:nix-community/flakelight";
|
url = "github:nix-community/flakelight";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
|
||||||
|
|
@ -304,7 +304,7 @@ fn test_write_all_lengths_ty<
|
||||||
let buffer = BitReadBuffer::new(&bytes, BigEndian);
|
let buffer = BitReadBuffer::new(&bytes, BigEndian);
|
||||||
let mut reader = BitReadStream::new(buffer);
|
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::<T>(bits).unwrap();
|
let actual = reader.read_int::<T>(bits).unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
expected_value,
|
expected_value,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue