ElementsProject / ElementsProject/rust-elements
inverted fields in `hex::Error::InvalidLength`
- 主要語言
- Rust
- 星號
- 57
- 分支
- 40
- 平均合併
- 11 小時 58 分鐘
- 30 天內合併 PR
- 1
描述
I am testing https://github.com/ElementsProject/rust-elements/pull/188 in a downstream lib
https://github.com/ElementsProject/rust-elements/blob/613204f38eeb8f4fcc767042197fd763965f057a/src/hex.rs#L33
I think the `expected, got` comment is wrong and the values used in the Display implementation are inverted.
I say so by looking at the macro impl after in a downstream lib I have this test failing to parse "aaaa" as asset id with
```
left: "bad hex string length 64 (expected 4)"
right: "bad hex string length 4 (expected 64)"
```
(the test was working with add54c80ba1821a16b88af59de16009f28379853)
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
從 src/hex.rs 約第 33 行開始,檢查 InvalidLength 註解、Display 實作和巨集實作。重現 downstream asset-id 對 "aaaa" 的解析情境,並比較預期的錯誤措辭;當實際長度和預期長度依照預定順序回報且註解一致時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- rust
- 領域
- backend
- Issue 類型
- 缺陷
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100