Merge pull request 'Update Rust' (#1015) from bump-rust into main

Reviewed-on: https://git.joinplu.me/Plume/Plume/pulls/1015
This commit is contained in:
KitaitiMakoto 2022-01-27 03:14:47 +00:00
commit 57a54cf016
5 changed files with 8 additions and 5 deletions

View file

@ -8,6 +8,10 @@
- Basque language
### Changed
- Bump Rust to nightly 2022-01-26
### Fixed
- Add explanation of sign-up step at sign-up page when email sign-up mode

View file

@ -304,14 +304,13 @@ impl FromId<DbConn> for Comment {
.chain(bcc)
.collect::<HashSet<_>>() // remove duplicates (don't do a query more than once)
.into_iter()
.map(|v| {
.flat_map(|v| {
if let Ok(user) = User::from_id(conn, &v, None, CONFIG.proxy()) {
vec![user]
} else {
vec![] // TODO try to fetch collection
}
})
.flatten()
.filter(|u| u.get_instance(conn).map(|i| i.local).unwrap_or(false))
.collect::<HashSet<User>>(); //remove duplicates (prevent db error)

View file

@ -57,7 +57,7 @@ impl<'a> WhitespaceTokenStream<'a> {
.filter(|&(_, ref c)| c.is_whitespace())
.map(|(offset, _)| offset)
.next()
.unwrap_or_else(|| self.text.len())
.unwrap_or(self.text.len())
}
}

View file

@ -1 +1 @@
nightly-2021-11-27
nightly-2022-01-27

View file

@ -17,7 +17,7 @@
@if !media.alt_text.is_empty() {
@media.alt_text
} else {
@media.content_warning.unwrap_or(i18n!(ctx.1, "No description"))
@media.content_warning.unwrap_or_else(|| i18n!(ctx.1, "No description")))
}
</option>
}