Open LimpidCrypto opened 1 year ago
Implement the Default for any struct it makes sense. The following example shows how much it makes it easier to define a struct:
let request = AccountInfo { account: "r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W", ..Default::default() };
Instead of having to define all fields for AccountInfo the user can just define the account and leave the rest to ..Default::default().
AccountInfo
account
..Default::default()
Implement the Default for any struct it makes sense. The following example shows how much it makes it easier to define a struct:
Instead of having to define all fields for
AccountInfo
the user can just define theaccount
and leave the rest to..Default::default()
.