matrix-sdk: Add more strict lints.

master
Damir Jelić 2020-05-13 12:47:24 +02:00
parent a8f94e2329
commit 5b1188a38b
3 changed files with 16 additions and 6 deletions

View File

@ -1268,7 +1268,7 @@ mod test {
#[tokio::test] #[tokio::test]
async fn room_creation() { async fn room_creation() {
let session = crate::Session { let session = Session {
access_token: "12345".to_owned(), access_token: "12345".to_owned(),
user_id: UserId::try_from("@example:localhost").unwrap(), user_id: UserId::try_from("@example:localhost").unwrap(),
device_id: "DEVICEID".to_owned(), device_id: "DEVICEID".to_owned(),
@ -1790,7 +1790,7 @@ mod test {
async fn invited_rooms() { async fn invited_rooms() {
use std::convert::TryFrom; use std::convert::TryFrom;
let session = crate::Session { let session = Session {
access_token: "12345".to_owned(), access_token: "12345".to_owned(),
user_id: UserId::try_from("@example:localhost").unwrap(), user_id: UserId::try_from("@example:localhost").unwrap(),
device_id: "DEVICEID".to_owned(), device_id: "DEVICEID".to_owned(),
@ -1823,7 +1823,7 @@ mod test {
async fn left_rooms() { async fn left_rooms() {
use std::convert::TryFrom; use std::convert::TryFrom;
let session = crate::Session { let session = Session {
access_token: "12345".to_owned(), access_token: "12345".to_owned(),
user_id: UserId::try_from("@example:localhost").unwrap(), user_id: UserId::try_from("@example:localhost").unwrap(),
device_id: "DEVICEID".to_owned(), device_id: "DEVICEID".to_owned(),

View File

@ -24,7 +24,17 @@
//! keys. If this is disabled and `encryption` support is enabled the keys will //! keys. If this is disabled and `encryption` support is enabled the keys will
//! by default be stored only in memory and thus lost after the client is //! by default be stored only in memory and thus lost after the client is
//! destroyed. //! destroyed.
#![deny(missing_docs)]
#![deny(
missing_debug_implementations,
dead_code,
missing_docs,
trivial_casts,
trivial_numeric_casts,
unused_extern_crates,
unused_import_braces,
unused_qualifications
)]
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
pub use matrix_sdk_base::JsonStore; pub use matrix_sdk_base::JsonStore;

View File

@ -34,7 +34,7 @@ use crate::js_int::UInt;
/// cli.create_room(builder).await; /// cli.create_room(builder).await;
/// # }) /// # })
/// ``` /// ```
#[derive(Clone, Default)] #[derive(Clone, Debug, Default)]
pub struct RoomBuilder { pub struct RoomBuilder {
/// Extra keys to be added to the content of the `m.room.create`. /// Extra keys to be added to the content of the `m.room.create`.
creation_content: Option<CreationContent>, creation_content: Option<CreationContent>,
@ -198,7 +198,7 @@ impl Into<create_room::Request> for RoomBuilder {
/// cli.room_messages(builder).await.is_err(); /// cli.room_messages(builder).await.is_err();
/// # }) /// # })
/// ``` /// ```
#[derive(Clone, Default)] #[derive(Clone, Debug, Default)]
pub struct MessagesRequestBuilder { pub struct MessagesRequestBuilder {
/// The room to get events from. /// The room to get events from.
room_id: Option<RoomId>, room_id: Option<RoomId>,