CodeChain-io / CodeChain-io/foundry
Use #[derive(RlpEncodableWrapper, RlpDecodableWrapper)]
Ouverte
good first issue
refactoring
- Langage dominant
- Rust
- Étoiles
- 36
- Forks
- 11
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
```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.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.