You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the latest Rust version (1.92), encoding enums gives a linter error.
For instance, running cargo clippy on:
use bitcode::{Decode,Encode};#[derive(Clone,Encode,Decode,PartialEq,Debug)]enumDiff{SetCellValue{sheet:u32,row:i32,column:i32,new_value:String,},CellClearContents{sheet:u32,row:i32,column:i32,},}fnmain(){let original = Diff::SetCellValue{sheet:0,row:1,column:2,new_value:"Hello, world!".to_string(),};let encoded:Vec<u8> = bitcode::encode(&original);let decoded:Diff = bitcode::decode(&encoded).unwrap();assert_eq!(original, decoded);}
produces a bunch of:
warning: value assigned to `sheet` is never read
--> src/main.rs:7:9
|
7 | sheet: u32,
| ^^^^^
|
= help: maybe it is overwritten before being read?
= note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default
warning: value assigned to `row` is never read
--> src/main.rs:8:9
|
8 | row: i32,
| ^^^
|
= help: maybe it is overwritten before being read?
Thanks very much! This is a duplicate of #89 but I don't blame you because I closed that issue when the PR fixing it merged, but before updating crates.io
Activity
finnbear commentedon Dec 17, 2025
Thanks very much! This is a duplicate of #89 but I don't blame you because I closed that issue when the PR fixing it merged, but before updating crates.io
nhatcher commentedon Dec 17, 2025
Amazing, thank you!
finnbear commentedon Dec 17, 2025
bitcode@0.6.8is available. Please confirm that it fixes this :)nhatcher commentedon Dec 17, 2025
Confirmed!
ironcalc/IronCalc#641
That is what I call I quick fix!