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

オープン
#189 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
rust
領域
backend

調査の方向性

src/hex.rs の 33 行目付近から始め、InvalidLength のコメント、Display の実装、マクロ実装を調べます。"aaaa" に対する downstream の asset-id parse ケースを再現し、期待されるエラーの文言と比較します。実際の長さと期待される長さが意図した順序で報告され、コメントが一致すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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)

主要言語
Rust
スター
57
フォーク
40
平均マージ
11時間 58分
マージ済み PR(30日)
1

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ElementsProject/rust-elements のほかの issue

ElementsProject/rust-elements の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。