chore: format according to cargo fmt
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
koalp 2021-05-08 03:24:26 +02:00
parent ac5ef59dfa
commit dd26be54b5
Signed by: koalp
GPG Key ID: 35B21047DEB09A81
2 changed files with 10 additions and 4 deletions

View File

@ -35,9 +35,7 @@ impl Builder {
.await?;
assert!(client.logged_in().await);
for room in &self.rooms {
client
.join_room_by_id(&room.as_str().try_into()?)
.await?;
client.join_room_by_id(&room.as_str().try_into()?).await?;
}
Ok(Chatbot { client })

View File

@ -15,7 +15,15 @@ pub async fn run() -> Result<()> {
env::var("CRIEUR_MATRIX_HOMESERVER"),
env::var("CRIEUR_MATRIX_ROOMS"),
) {
(Ok(user), Ok(password), Ok(homeserver), Ok(rooms)) => (user, password, homeserver, rooms.split(",").map(|s| s.to_string()).collect::<Vec<String>>()),
(Ok(user), Ok(password), Ok(homeserver), Ok(rooms)) => (
user,
password,
homeserver,
rooms
.split(",")
.map(|s| s.to_string())
.collect::<Vec<String>>(),
),
_ => bail!("Configuration incomplete, please set all required environment variables"),
};