Skip to content

Commit 6a1c74c

Browse files
committed
remove return keywords as per clippy warnings
Signed-off-by: MTRNord <[email protected]>
1 parent eea3555 commit 6a1c74c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

bindings/matrix-sdk-ffi/src/client.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -961,14 +961,14 @@ impl Client {
961961
)
962962
.await?;
963963

964-
return Ok(Arc::new(MediaFileHandle::new(handle)));
964+
Ok(Arc::new(MediaFileHandle::new(handle)))
965965
}
966966

967967
#[cfg(target_family = "wasm")]
968-
return Err(ClientError::Generic {
968+
Err(ClientError::Generic {
969969
msg: "get_media_file is not supported on wasm platforms".to_owned(),
970970
details: None,
971-
});
971+
})
972972
}
973973

974974
pub async fn set_display_name(&self, name: String) -> Result<(), ClientError> {
@@ -979,7 +979,7 @@ impl Client {
979979
.set_display_name(Some(name.as_str()))
980980
.await
981981
.context("Unable to set display name")?;
982-
return Ok(());
982+
Ok(())
983983
}
984984

985985
#[cfg(target_family = "wasm")]
@@ -2504,17 +2504,17 @@ impl MediaFileHandle {
25042504
.unwrap()
25052505
.to_owned());
25062506
#[cfg(target_family = "wasm")]
2507-
return Err(ClientError::Generic {
2507+
Err(ClientError::Generic {
25082508
msg: "MediaFileHandle.path() is not supported on WASM targets".to_string(),
25092509
details: None,
2510-
});
2510+
})
25112511
}
25122512

25132513
pub fn persist(&self, path: String) -> Result<bool, ClientError> {
25142514
#[cfg(not(target_family = "wasm"))]
25152515
{
25162516
let mut guard = self.inner.write().unwrap();
2517-
return Ok(
2517+
Ok(
25182518
match guard
25192519
.take()
25202520
.context("MediaFileHandle was already persisted")?
@@ -2526,13 +2526,13 @@ impl MediaFileHandle {
25262526
false
25272527
}
25282528
},
2529-
);
2529+
)
25302530
}
25312531
#[cfg(target_family = "wasm")]
2532-
return Err(ClientError::Generic {
2532+
Err(ClientError::Generic {
25332533
msg: "MediaFileHandle.persist() is not supported on WASM targets".to_string(),
25342534
details: None,
2535-
});
2535+
})
25362536
}
25372537
}
25382538

0 commit comments

Comments
 (0)