cargo fix
This commit is contained in:
parent
a4637e2ba1
commit
f47a5cd5d5
21 changed files with 51 additions and 79 deletions
|
@ -3,17 +3,14 @@ mod data;
|
|||
pub use data::Data;
|
||||
|
||||
use ruma::{
|
||||
api::client::error::ErrorKind,
|
||||
events::{AnyEphemeralRoomEvent, RoomAccountDataEventType},
|
||||
serde::Raw,
|
||||
signatures::CanonicalJsonValue,
|
||||
DeviceId, RoomId, UserId,
|
||||
serde::Raw, RoomId, UserId,
|
||||
};
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
use tracing::error;
|
||||
|
||||
use crate::{service::*, services, utils, Error, Result};
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
|
||||
|
||||
use crate::{Result};
|
||||
|
||||
pub struct Service {
|
||||
db: Arc<dyn Data>,
|
||||
|
|
|
@ -26,12 +26,11 @@ use ruma::{
|
|||
EventId, RoomAliasId, RoomId, RoomName, RoomVersionId, ServerName, UserId,
|
||||
};
|
||||
use serde_json::value::to_raw_value;
|
||||
use tokio::sync::{mpsc, MutexGuard, RwLock, RwLockReadGuard};
|
||||
use tokio::sync::{mpsc, MutexGuard};
|
||||
|
||||
use crate::{
|
||||
api::{
|
||||
client_server::{leave_all_rooms, AUTO_GEN_PASSWORD_LENGTH},
|
||||
server_server,
|
||||
},
|
||||
services,
|
||||
utils::{self, HtmlEscape},
|
||||
|
|
|
@ -2,15 +2,15 @@ mod data;
|
|||
pub use data::Data;
|
||||
|
||||
use crate::api::server_server::FedDest;
|
||||
use crate::service::*;
|
||||
|
||||
use crate::{utils, Config, Error, Result};
|
||||
|
||||
use crate::{Config, Error, Result};
|
||||
use ruma::{
|
||||
api::{
|
||||
client::sync::sync_events,
|
||||
federation::discovery::{ServerSigningKeys, VerifyKey},
|
||||
},
|
||||
DeviceId, EventId, MilliSecondsSinceUnixEpoch, RoomId, RoomVersionId, ServerName,
|
||||
DeviceId, EventId, RoomId, RoomVersionId, ServerName,
|
||||
ServerSigningKeyId, UserId,
|
||||
};
|
||||
use std::{
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
mod data;
|
||||
pub use data::Data;
|
||||
|
||||
use crate::{services, utils, Error, Result};
|
||||
use crate::{Result};
|
||||
use ruma::{
|
||||
api::client::{
|
||||
backup::{BackupAlgorithm, KeyBackupData, RoomKeyBackup},
|
||||
error::ErrorKind,
|
||||
},
|
||||
serde::Raw,
|
||||
RoomId, UserId,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
mod data;
|
||||
pub use data::Data;
|
||||
|
||||
use crate::{services, utils, Error, Result};
|
||||
use crate::{services, Result};
|
||||
use image::{imageops::FilterType, GenericImageView};
|
||||
use std::{mem, sync::Arc};
|
||||
use std::{sync::Arc};
|
||||
use tokio::{
|
||||
fs::File,
|
||||
io::{AsyncReadExt, AsyncWriteExt},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use std::{
|
||||
collections::{BTreeMap, HashMap},
|
||||
collections::{HashMap},
|
||||
sync::{Arc, Mutex},
|
||||
};
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ use ruma::{
|
|||
state_res::{self, RoomVersion, StateMap},
|
||||
uint, EventId, MilliSecondsSinceUnixEpoch, RoomId, ServerName, ServerSigningKeyId,
|
||||
};
|
||||
use serde_json::value::{to_raw_value, RawValue as RawJsonValue};
|
||||
use serde_json::value::{RawValue as RawJsonValue};
|
||||
use tracing::{debug, error, info, trace, warn};
|
||||
|
||||
use crate::{service::*, services, Error, PduEvent, Result};
|
||||
|
|
|
@ -4,7 +4,7 @@ use std::sync::Arc;
|
|||
pub use data::Data;
|
||||
use ruma::{events::StateEventType, EventId, RoomId};
|
||||
|
||||
use crate::{services, utils, Error, Result};
|
||||
use crate::{Result};
|
||||
|
||||
pub struct Service {
|
||||
db: Arc<dyn Data>,
|
||||
|
|
|
@ -2,21 +2,19 @@ mod data;
|
|||
use std::{collections::HashSet, sync::Arc};
|
||||
|
||||
pub use data::Data;
|
||||
use regex::Regex;
|
||||
|
||||
use ruma::{
|
||||
events::{
|
||||
direct::{DirectEvent, DirectEventContent},
|
||||
direct::{DirectEvent},
|
||||
ignored_user_list::IgnoredUserListEvent,
|
||||
room::{create::RoomCreateEventContent, member::MembershipState},
|
||||
tag::{TagEvent, TagEventContent},
|
||||
AnyStrippedStateEvent, AnySyncStateEvent, GlobalAccountDataEventType, RoomAccountDataEvent,
|
||||
RoomAccountDataEventContent, RoomAccountDataEventType, StateEventType,
|
||||
AnyStrippedStateEvent, AnySyncStateEvent, GlobalAccountDataEventType, RoomAccountDataEventType, StateEventType,
|
||||
},
|
||||
serde::Raw,
|
||||
RoomId, ServerName, UserId,
|
||||
};
|
||||
|
||||
use crate::{services, utils, Error, Result};
|
||||
use crate::{services, Error, Result};
|
||||
|
||||
pub struct Service {
|
||||
db: Arc<dyn Data>,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
mod data;
|
||||
use std::borrow::Cow;
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::fmt::Debug;
|
||||
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::{collections::HashSet, iter};
|
||||
use std::{collections::HashSet};
|
||||
|
||||
pub use data::Data;
|
||||
use regex::Regex;
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::{
|
|||
};
|
||||
use federation::transactions::send_transaction_message;
|
||||
use futures_util::{stream::FuturesUnordered, StreamExt};
|
||||
use ring::digest;
|
||||
|
||||
use ruma::{
|
||||
api::{
|
||||
appservice,
|
||||
|
@ -33,7 +33,7 @@ use ruma::{
|
|||
};
|
||||
use tokio::{
|
||||
select,
|
||||
sync::{mpsc, RwLock, Semaphore},
|
||||
sync::{mpsc, Semaphore},
|
||||
};
|
||||
use tracing::{error, warn};
|
||||
|
||||
|
@ -297,7 +297,7 @@ impl Service {
|
|||
.sending
|
||||
.servername_educount
|
||||
.get(server.as_bytes())?
|
||||
.map_or(Ok(0), |bytes| {
|
||||
.map_or(Ok(0), |&bytes| {
|
||||
utils::u64_from_bytes(&bytes)
|
||||
.map_err(|_| Error::bad_database("Invalid u64 in servername_educount."))
|
||||
})?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue