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 - Basque language
### Changed
- Bump Rust to nightly 2022-01-26
### Fixed ### Fixed
- Add explanation of sign-up step at sign-up page when email sign-up mode - 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) .chain(bcc)
.collect::<HashSet<_>>() // remove duplicates (don't do a query more than once) .collect::<HashSet<_>>() // remove duplicates (don't do a query more than once)
.into_iter() .into_iter()
.map(|v| { .flat_map(|v| {
if let Ok(user) = User::from_id(conn, &v, None, CONFIG.proxy()) { if let Ok(user) = User::from_id(conn, &v, None, CONFIG.proxy()) {
vec![user] vec![user]
} else { } else {
vec![] // TODO try to fetch collection vec![] // TODO try to fetch collection
} }
}) })
.flatten()
.filter(|u| u.get_instance(conn).map(|i| i.local).unwrap_or(false)) .filter(|u| u.get_instance(conn).map(|i| i.local).unwrap_or(false))
.collect::<HashSet<User>>(); //remove duplicates (prevent db error) .collect::<HashSet<User>>(); //remove duplicates (prevent db error)

View File

@ -57,7 +57,7 @@ impl<'a> WhitespaceTokenStream<'a> {
.filter(|&(_, ref c)| c.is_whitespace()) .filter(|&(_, ref c)| c.is_whitespace())
.map(|(offset, _)| offset) .map(|(offset, _)| offset)
.next() .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() { @if !media.alt_text.is_empty() {
@media.alt_text @media.alt_text
} else { } else {
@media.content_warning.unwrap_or(i18n!(ctx.1, "No description")) @media.content_warning.unwrap_or_else(|| i18n!(ctx.1, "No description")))
} }
</option> </option>
} }