ElementsProject / ElementsProject/rust-elements

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

Aberta
#189 1 comentário 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Rust
Estrelas
57
Forks
40
Merge médio
11h 58min
PRs com merge (30d)
1

Descrição

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)

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.