CodeChain-io / CodeChain-io/foundry
Use #[derive(RlpEncodableWrapper, RlpDecodableWrapper)]
オープン
good first issue
refactoring
- 主要言語
- Rust
- スター
- 36
- フォーク
- 11
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
```rust
struct StructWithSingleField {
field: T
}
impl Encodable for StructWithSingleField {
fn rlp_append(&self, s: &mut RlpStream) {
self.field.rlp_append(s);
}
}
```
can be simplified to
```rust
#[derive(RlpEncodableWrapper)]
struct StructWithSingleField {
field: T
}
```
It can be applied to `struct StructWithSingleTuple(T)`, and `RlpDecodable` too.
コントリビューションガイド
評価
この issue はまだ評価されていません。