Remove TryFrom, TryInto imports

They are no longer needed in the 2021 edition.
merge-requests/279/head
Jonas Platte 2 years ago
parent b4755ba15b
commit abb4b4cf0b
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

@ -1,12 +1,7 @@
use crate::{utils, Error, Result};
use bytes::BytesMut;
use ruma::api::{IncomingResponse, OutgoingRequest, SendAccessToken};
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
mem,
time::Duration,
};
use std::{fmt::Debug, mem, time::Duration};
use tracing::warn;
pub(crate) async fn send_request<T: OutgoingRequest>(

@ -1,4 +1,4 @@
use std::{collections::BTreeMap, convert::TryInto, sync::Arc};
use std::{collections::BTreeMap, sync::Arc};
use super::{DEVICE_ID_LENGTH, SESSION_ID_LENGTH, TOKEN_LENGTH};
use crate::{database::DatabaseGuard, pdu::PduBuilder, utils, ConduitResult, Error, Ruma};

@ -3,7 +3,7 @@ use ruma::{
api::client::{error::ErrorKind, r0::context::get_context},
events::EventType,
};
use std::{collections::HashSet, convert::TryFrom};
use std::collections::HashSet;
#[cfg(feature = "conduit_bin")]
use rocket::get;

@ -1,5 +1,3 @@
use std::convert::TryInto;
use crate::{database::DatabaseGuard, ConduitResult, Database, Error, Result, Ruma};
use ruma::{
api::{

@ -9,7 +9,6 @@ use ruma::api::client::{
get_media_config,
},
};
use std::convert::TryInto;
#[cfg(feature = "conduit_bin")]
use rocket::{get, post};

@ -30,7 +30,6 @@ use ruma::{
use serde_json::value::{to_raw_value, RawValue as RawJsonValue};
use std::{
collections::{hash_map::Entry, BTreeMap, HashMap, HashSet},
convert::{TryFrom, TryInto},
iter,
sync::{Arc, RwLock},
time::{Duration, Instant},

@ -8,7 +8,6 @@ use ruma::{
};
use std::{
collections::{BTreeMap, HashSet},
convert::TryInto,
sync::Arc,
};

@ -1,6 +1,6 @@
use crate::{database::DatabaseGuard, utils, ConduitResult, Ruma};
use ruma::api::client::r0::presence::{get_presence, set_presence};
use std::{convert::TryInto, time::Duration};
use std::time::Duration;
#[cfg(feature = "conduit_bin")]
use rocket::{get, put};

@ -12,7 +12,7 @@ use ruma::{
events::{room::member::RoomMemberEventContent, EventType},
};
use serde_json::value::to_raw_value;
use std::{convert::TryInto, sync::Arc};
use std::sync::Arc;
#[cfg(feature = "conduit_bin")]
use rocket::{get, put};

@ -27,7 +27,7 @@ use ruma::{
RoomAliasId, RoomId, RoomVersionId,
};
use serde_json::{json, value::to_raw_value};
use std::{cmp::max, collections::BTreeMap, convert::TryInto, sync::Arc};
use std::{cmp::max, collections::BTreeMap, sync::Arc};
use tracing::{info, warn};
#[cfg(feature = "conduit_bin")]

@ -14,7 +14,6 @@ use ruma::{
};
use std::{
collections::{hash_map::Entry, BTreeMap, HashMap, HashSet},
convert::TryInto,
sync::Arc,
time::Duration,
};

@ -28,7 +28,6 @@ use ruma::{DeviceId, EventId, RoomId, ServerName, UserId};
use serde::{de::IgnoredAny, Deserialize};
use std::{
collections::{BTreeMap, HashMap, HashSet},
convert::{TryFrom, TryInto},
fs::{self, remove_dir_all},
io::Write,
mem::size_of,

@ -6,7 +6,7 @@ use ruma::{
RoomId, UserId,
};
use serde::{de::DeserializeOwned, Serialize};
use std::{collections::HashMap, convert::TryFrom, sync::Arc};
use std::{collections::HashMap, sync::Arc};
use super::abstraction::Tree;

@ -1,4 +1,4 @@
use std::{convert::TryInto, sync::Arc};
use std::sync::Arc;
use crate::{pdu::PduBuilder, Database};
use rocket::futures::{channel::mpsc, stream::StreamExt};

@ -19,7 +19,7 @@ use ruma::{
};
use tracing::{error, info, warn};
use std::{convert::TryFrom, fmt::Debug, mem, sync::Arc};
use std::{fmt::Debug, mem, sync::Arc};
use super::abstraction::Tree;

@ -35,7 +35,6 @@ use serde_json::value::to_raw_value;
use std::{
borrow::Cow,
collections::{BTreeMap, HashMap, HashSet},
convert::{TryFrom, TryInto},
fmt::Debug,
iter,
mem::size_of,

@ -11,7 +11,6 @@ use ruma::{
};
use std::{
collections::{HashMap, HashSet},
convert::TryInto,
mem,
sync::Arc,
};

@ -1,6 +1,5 @@
use std::{
collections::{BTreeMap, HashMap, HashSet},
convert::TryInto,
fmt::Debug,
sync::Arc,
time::{Duration, Instant},

@ -11,12 +11,7 @@ use ruma::{
DeviceId, DeviceKeyAlgorithm, DeviceKeyId, MilliSecondsSinceUnixEpoch, RoomAliasId, UInt,
UserId,
};
use std::{
collections::BTreeMap,
convert::{TryFrom, TryInto},
mem,
sync::Arc,
};
use std::{collections::BTreeMap, mem, sync::Arc};
use tracing::warn;
use super::abstraction::Tree;

@ -12,7 +12,7 @@ use serde_json::{
json,
value::{to_raw_value, RawValue as RawJsonValue},
};
use std::{cmp::Ordering, collections::BTreeMap, convert::TryInto, sync::Arc};
use std::{cmp::Ordering, collections::BTreeMap, sync::Arc};
use tracing::warn;
/// Content hashes of a PDU.

@ -60,7 +60,6 @@ use ruma::{
use serde_json::value::{to_raw_value, RawValue as RawJsonValue};
use std::{
collections::{btree_map, hash_map, BTreeMap, BTreeSet, HashMap, HashSet},
convert::{TryFrom, TryInto},
fmt::Debug,
future::Future,
mem,

@ -4,7 +4,6 @@ use rand::prelude::*;
use ruma::serde::{try_from_json_map, CanonicalJsonError, CanonicalJsonObject};
use std::{
cmp,
convert::TryInto,
str::FromStr,
time::{SystemTime, UNIX_EPOCH},
};

Loading…
Cancel
Save