Improve initialization in test_user

rust
Elnu 1 year ago
parent 04b4240e0f
commit d2758c852e

@ -255,10 +255,11 @@ mod tests {
use crate::User; use crate::User;
fn test_user(name: &str, discriminator: u16) -> User { fn test_user(name: &str, discriminator: u16) -> User {
let mut user = User::default(); User {
user.name = name.to_owned(); name: name.to_owned(),
user.discriminator = discriminator; discriminator,
user ..Default::default()
}
} }
#[test] #[test]

Loading…
Cancel
Save