mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 15:21:24 +01:00
enable default_trait_access lint
This commit is contained in:
parent
da842c6499
commit
0f2cf26a36
7 changed files with 20 additions and 13 deletions
|
|
@ -21,6 +21,7 @@ as_conversions = "warn"
|
||||||
assertions_on_result_states = "warn"
|
assertions_on_result_states = "warn"
|
||||||
cloned_instead_of_copied = "warn"
|
cloned_instead_of_copied = "warn"
|
||||||
dbg_macro = "warn"
|
dbg_macro = "warn"
|
||||||
|
default_trait_access = "warn"
|
||||||
default_union_representation = "warn"
|
default_union_representation = "warn"
|
||||||
deref_by_slicing = "warn"
|
deref_by_slicing = "warn"
|
||||||
empty_drop = "warn"
|
empty_drop = "warn"
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ pub(crate) async fn register_route(
|
||||||
stages: vec![AuthType::RegistrationToken],
|
stages: vec![AuthType::RegistrationToken],
|
||||||
}],
|
}],
|
||||||
completed: Vec::new(),
|
completed: Vec::new(),
|
||||||
params: Default::default(),
|
params: Box::default(),
|
||||||
session: None,
|
session: None,
|
||||||
auth_error: None,
|
auth_error: None,
|
||||||
};
|
};
|
||||||
|
|
@ -163,7 +163,7 @@ pub(crate) async fn register_route(
|
||||||
stages: vec![AuthType::Dummy],
|
stages: vec![AuthType::Dummy],
|
||||||
}],
|
}],
|
||||||
completed: Vec::new(),
|
completed: Vec::new(),
|
||||||
params: Default::default(),
|
params: Box::default(),
|
||||||
session: None,
|
session: None,
|
||||||
auth_error: None,
|
auth_error: None,
|
||||||
};
|
};
|
||||||
|
|
@ -320,7 +320,7 @@ pub(crate) async fn change_password_route(
|
||||||
stages: vec![AuthType::Password],
|
stages: vec![AuthType::Password],
|
||||||
}],
|
}],
|
||||||
completed: Vec::new(),
|
completed: Vec::new(),
|
||||||
params: Default::default(),
|
params: Box::default(),
|
||||||
session: None,
|
session: None,
|
||||||
auth_error: None,
|
auth_error: None,
|
||||||
};
|
};
|
||||||
|
|
@ -407,7 +407,7 @@ pub(crate) async fn deactivate_route(
|
||||||
stages: vec![AuthType::Password],
|
stages: vec![AuthType::Password],
|
||||||
}],
|
}],
|
||||||
completed: Vec::new(),
|
completed: Vec::new(),
|
||||||
params: Default::default(),
|
params: Box::default(),
|
||||||
session: None,
|
session: None,
|
||||||
auth_error: None,
|
auth_error: None,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ pub(crate) async fn delete_device_route(
|
||||||
stages: vec![AuthType::Password],
|
stages: vec![AuthType::Password],
|
||||||
}],
|
}],
|
||||||
completed: Vec::new(),
|
completed: Vec::new(),
|
||||||
params: Default::default(),
|
params: Box::default(),
|
||||||
session: None,
|
session: None,
|
||||||
auth_error: None,
|
auth_error: None,
|
||||||
};
|
};
|
||||||
|
|
@ -137,7 +137,7 @@ pub(crate) async fn delete_devices_route(
|
||||||
stages: vec![AuthType::Password],
|
stages: vec![AuthType::Password],
|
||||||
}],
|
}],
|
||||||
completed: Vec::new(),
|
completed: Vec::new(),
|
||||||
params: Default::default(),
|
params: Box::default(),
|
||||||
session: None,
|
session: None,
|
||||||
auth_error: None,
|
auth_error: None,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ pub(crate) async fn upload_signing_keys_route(
|
||||||
stages: vec![AuthType::Password],
|
stages: vec![AuthType::Password],
|
||||||
}],
|
}],
|
||||||
completed: Vec::new(),
|
completed: Vec::new(),
|
||||||
params: Default::default(),
|
params: Box::default(),
|
||||||
session: None,
|
session: None,
|
||||||
auth_error: None,
|
auth_error: None,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,13 @@ use crate::{services, utils, Error, Result, Ruma};
|
||||||
use ruma::{
|
use ruma::{
|
||||||
api::client::{
|
api::client::{
|
||||||
error::ErrorKind,
|
error::ErrorKind,
|
||||||
session::{get_login_types, login, logout, logout_all},
|
session::{
|
||||||
|
get_login_types::{
|
||||||
|
self,
|
||||||
|
v3::{ApplicationServiceLoginType, PasswordLoginType},
|
||||||
|
},
|
||||||
|
login, logout, logout_all,
|
||||||
|
},
|
||||||
uiaa::UserIdentifier,
|
uiaa::UserIdentifier,
|
||||||
},
|
},
|
||||||
UserId,
|
UserId,
|
||||||
|
|
@ -25,8 +31,8 @@ pub(crate) async fn get_login_types_route(
|
||||||
_body: Ruma<get_login_types::v3::Request>,
|
_body: Ruma<get_login_types::v3::Request>,
|
||||||
) -> Result<get_login_types::v3::Response> {
|
) -> Result<get_login_types::v3::Response> {
|
||||||
Ok(get_login_types::v3::Response::new(vec![
|
Ok(get_login_types::v3::Response::new(vec![
|
||||||
get_login_types::v3::LoginType::Password(Default::default()),
|
get_login_types::v3::LoginType::Password(PasswordLoginType::default()),
|
||||||
get_login_types::v3::LoginType::ApplicationService(Default::default()),
|
get_login_types::v3::LoginType::ApplicationService(ApplicationServiceLoginType::default()),
|
||||||
]))
|
]))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ pub(crate) use data::Data;
|
||||||
use ruma::{
|
use ruma::{
|
||||||
api::client::{error::ErrorKind, threads::get_threads::v1::IncludeThreads},
|
api::client::{error::ErrorKind, threads::get_threads::v1::IncludeThreads},
|
||||||
events::relation::BundledThread,
|
events::relation::BundledThread,
|
||||||
uint, CanonicalJsonValue, EventId, RoomId, UserId,
|
uint, CanonicalJsonObject, CanonicalJsonValue, EventId, RoomId, UserId,
|
||||||
};
|
};
|
||||||
|
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
@ -56,7 +56,7 @@ impl Service {
|
||||||
|
|
||||||
if let CanonicalJsonValue::Object(unsigned) = root_pdu_json
|
if let CanonicalJsonValue::Object(unsigned) = root_pdu_json
|
||||||
.entry("unsigned".to_owned())
|
.entry("unsigned".to_owned())
|
||||||
.or_insert_with(|| CanonicalJsonValue::Object(Default::default()))
|
.or_insert_with(|| CanonicalJsonValue::Object(CanonicalJsonObject::default()))
|
||||||
{
|
{
|
||||||
if let Some(mut relations) = unsigned
|
if let Some(mut relations) = unsigned
|
||||||
.get("m.relations")
|
.get("m.relations")
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ impl Service {
|
||||||
if let Some(state_key) = &pdu.state_key {
|
if let Some(state_key) = &pdu.state_key {
|
||||||
if let CanonicalJsonValue::Object(unsigned) = pdu_json
|
if let CanonicalJsonValue::Object(unsigned) = pdu_json
|
||||||
.entry("unsigned".to_owned())
|
.entry("unsigned".to_owned())
|
||||||
.or_insert_with(|| CanonicalJsonValue::Object(Default::default()))
|
.or_insert_with(|| CanonicalJsonValue::Object(CanonicalJsonObject::default()))
|
||||||
{
|
{
|
||||||
if let Some(shortstatehash) = services()
|
if let Some(shortstatehash) = services()
|
||||||
.rooms
|
.rooms
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue