diff --git a/src/main.rs b/src/main.rs index 9339b35..2a4bc08 100644 --- a/src/main.rs +++ b/src/main.rs @@ -255,10 +255,11 @@ mod tests { use crate::User; fn test_user(name: &str, discriminator: u16) -> User { - let mut user = User::default(); - user.name = name.to_owned(); - user.discriminator = discriminator; - user + User { + name: name.to_owned(), + discriminator, + ..Default::default() + } } #[test]