client: Use constructor for non-exhaustive LoginInfo struct

This commit is contained in:
Isaiah Inuwa 2021-11-23 22:35:32 -06:00 committed by iinuwa
parent d988a77ac0
commit 370d59a9bc

View File

@ -28,12 +28,10 @@ impl<C: HttpClient> Client<C> {
initial_device_display_name: Option<&str>, initial_device_display_name: Option<&str>,
) -> Result<login::Response, Error<C::Error, ruma_client_api::Error>> { ) -> Result<login::Response, Error<C::Error, ruma_client_api::Error>> {
let response = self let response = self
.send_request(assign!( .send_request(assign!(login::Request::new(
login::Request::new( LoginInfo::Password(login::Password::new(UserIdentifier::MatrixId(user), password))), {
LoginInfo::Password(login::Password { identifier: UserIdentifier::MatrixId(user), password }) device_id,
), { initial_device_display_name,
device_id,
initial_device_display_name,
} }
)) ))
.await?; .await?;