ElementsProject / ElementsProject/rust-elements

inverted fields in `hex::Error::InvalidLength`

未关闭
#189 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
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)

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。