CodeChain-io / CodeChain-io/foundry
Use #[derive(RlpEncodableWrapper, RlpDecodableWrapper)]
Aperta
good first issue
refactoring
- Lingua principale
- Rust
- Stelle
- 36
- Fork
- 11
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
```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.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.