Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new nightly warnings #4496

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bindings/matrix-sdk-ffi/src/timeline/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl Timeline {
.thumbnail(thumbnail)
.info(attachment_info)
.caption(params.caption)
.formatted_caption(formatted_caption.map(Into::into))
.formatted_caption(formatted_caption)
.mentions(params.mentions.map(Into::into));

let handle = SendAttachmentJoinHandle::new(RUNTIME.spawn(async move {
Expand Down
2 changes: 1 addition & 1 deletion crates/matrix-sdk-common/src/linked_chunk/as_vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ mod tests {
assert_items_eq!(linked_chunk, ['a', 'b', 'c'] ['d']);

// Empty updates first.
let _ = linked_chunk.updates().take();
let _ = linked_chunk.updates().unwrap().take();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that was indeed the expected behavior.


// Start observing future updates.
let mut as_vector = linked_chunk.as_vector().unwrap();
Expand Down
1 change: 1 addition & 0 deletions crates/matrix-sdk-common/src/linked_chunk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,7 @@ impl<const CAP: usize, Item, Gap> LinkedChunk<CAP, Item, Gap> {
/// It returns `None` if updates are disabled, i.e. if this linked chunk has
/// been constructed with [`Self::new`], otherwise, if it's been constructed
/// with [`Self::new_with_update_history`], it returns `Some(…)`.
#[must_use]
pub fn updates(&mut self) -> Option<&mut ObservableUpdates<Item, Gap>> {
self.updates.as_mut()
}
Expand Down
6 changes: 2 additions & 4 deletions crates/matrix-sdk/src/oidc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1160,8 +1160,7 @@ impl Oidc {
#[cfg(feature = "e2e-encryption")]
None,
)
.await
.map_err(crate::Error::from)?;
.await?;
// At this point the Olm machine has been set up.

// Enable the cross-process lock for refreshes, if needs be.
Expand Down Expand Up @@ -1313,8 +1312,7 @@ impl Oidc {
refresh_token.clone(),
latest_id_token.clone(),
)
.await
.map_err(OidcError::from)?;
.await?;

trace!(
"Token refresh: new refresh_token: {} / access_token: {:x}",
Expand Down
2 changes: 1 addition & 1 deletion examples/persist_session/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async fn main() -> anyhow::Result<()> {
(login(&data_dir, &session_file).await?, None)
};

sync(client, sync_token, &session_file).await.map_err(Into::into)
sync(client, sync_token, &session_file).await
}

/// Restore a previous session.
Expand Down
Loading