ElementsProject / ElementsProject/rust-elements

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

Đang mở
#189 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
57
Fork
40
Merge trung bình
11 giờ 58 phút
Pull request đã merge (30 ngày)
1

Mô tả

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)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.