use bon
instead of typed-builder
#1289
Labels
O: code-hygiene
Objective: aims to improve code hygiene
O: testing
Objective: aims to improve testing coverage
O: usability
Objective: aims to enhance user experience (UX) and streamline product usability
Improvement Summary
Rust functions don't have named arguments, and each argument is required.
But this is a bit annoying when we are writing tests with default values or fixtures. To have optional named arguments in Rust, we need to create an argument struct and pass it.
Untill now, we didn't have any proper macro library that avoid this code bloat. Currently, in our tests, (mainly in
ibc-testkit
) we manually define these structs and auto-derive a Builder pattern usingtyped-builder
.Proposal
Recently, there is a new library called
bon
which offers solutions to this exact problem.bon
checks arguments at compile time, just liketyped-builder
.The text was updated successfully, but these errors were encountered: