Fix most clippy warnings
[?]
Sep 29, 2020, 12:48 PM
F5E5NQPABQW6TXEHI7SH5ZSHEXYBOO5QW6XETXMTXLWLTCTTE2BACDependencies
- [2]
H3RWXT2VCleanup most warnings - [3]
ZT3YEIVXConsume connection on processing command - [4]
RRLRZTMRUse element processor for iq - [5]
7WM64CI7Implement all previous functionality - [6]
LL3D5CXKStaring using element processor - [7]
LQXBWNFTRemove unneeded requirement - [8]
GXQCDLYQUse element processor for incoming iq get - [9]
3DSOPLCGAdd rustdoc - [10]
BYJPYYSMProcess iq ping response - [11]
PJV5HPIFStarting to imlements timeouts for iqs - [12]
GVZ4JAR5Process self-presence with incoming stanza processor - [13]
SH3LIQ4SStarting commands support - [14]
2THKW66MIgnore .orig files - [15]
HDLI2X4HIgnore delayed XEP-0203 messages - [16]
5WHNHD42Update dependencies - [17]
KORYGY74Set presence to account and MUC - [18]
AEH7WP42Make element processors static - [19]
PLWPCM47Add id to initital presence - [20]
LNUU5R56Support disco#info from XEP-0030 Service Discovery - [21]
OFLAP2G2Fix possible utf8 errors - [22]
ZFBPXPADCleanup timeouted iq requests with ping Output elapsed time. Refactor iq handling. - [23]
QDHDTOLMStarting support for commands XEP-0050: Ad-Hoc Commands (there no support in xmpp_parsers still) - [24]
CCLGGFKRMove out XmppConnection into own file - [25]
YTN366WASupport disco#items - [26]
U3UZTFCHRe-try to subscribe if not subscribed - [27]
Z3NQEYVIRename IqSetHandler to IqResuestHandler as it should provide both get and set handling - [28]
NXDEBFWRSwitch to tokio 0.2 and async - [29]
W6GSBP3ZAdd id for presence stanzas - [30]
DCMDASHVMention XEP-0050 and XEP-0203 support - [31]
WDCZNZOPFix rustdoc - [32]
RQZCVDFDImplement applying timeout for expired iq await - [33]
YEMBT7TBAdd support for XEP-0092: Software Version - [34]
4IPZTMFIUpdate dependencies - [35]
JY4F7VBCUse element processor for incoming iq set - [36]
6UKCVM6EUse new iq processng for initial roster - [37]
SSOKGGCEUpdate dependencies - [38]
S754Y5DFRefactor IQ processing Always answer to set and get requests. Use XML encoding for stanzas. - [39]
DYRPAV6TUpdate dependencies - [*]
FVVPKFTLInitial commit
Change contents
- replacement in src/xmpp/xmpp_connection.rs at line 494[3.8411]→[3.8411:8559](∅→∅),[3.8559]→[2.39:76](∅→∅),[2.76]→[3.8602:8625](∅→∅),[3.8602]→[3.8602:8625](∅→∅)
Either::Right(((result, Either::Left(_)), _)) => match result {Ok(connection) => break Ok(connection),Err(_) => {}},Either::Right(((result, Either::Left(_)), _)) => {if let Ok(connection) = result {break Ok(connection);}} - replacement in src/xmpp/element_processor.rs at line 0
type Func<S, T, E> = dyn Fn(&mut S, E) -> T + Sync;pub struct Processor<S: 'static, T: 'static, E: Clone + 'static> {processors: Vec<Box<Func<S, Option<T>, E>>>,default: &'static Func<S, T, E>,}impl<S: 'static, T: 'static, E: Clone + 'static> Processor<S, T, E> {pub fn new<F>(f: &'static F) -> Processor<S, T, E>whereF: Fn(&mut S, E) -> T + Sync + 'static,{Processor {processors: vec![],default: f,}}pub fn register<F, A>(&mut self, f: &'static F)whereF: Fn(&mut S, A) -> T + Sync + 'static,A: std::convert::TryFrom<E>,{self.processors.push(Box::new(move |s, e: E| {use std::convert::TryInto;(e.try_into().ok() as Option<A>).map(|a| f(s, a))}));}pub fn process(&self, s: &mut S, e: E) -> T {for processor in self.processors.iter() {match processor(s, e.clone()) {Some(t) => return t,None => continue,}}(*self.default)(s, e)}}[3.11301]type Func<S, T, E> = dyn Fn(&mut S, E) -> T + Sync;pub struct Processor<S: 'static, T: 'static, E: Clone + 'static> {processors: Vec<Box<Func<S, Option<T>, E>>>,default: &'static Func<S, T, E>,}impl<S: 'static, T: 'static, E: Clone + 'static> Processor<S, T, E> {pub fn new<F>(f: &'static F) -> Processor<S, T, E>whereF: Fn(&mut S, E) -> T + Sync + 'static,{Processor {processors: vec![],default: f,}}pub fn register<F, A>(&mut self, f: &'static F)whereF: Fn(&mut S, A) -> T + Sync + 'static,A: std::convert::TryFrom<E>,{self.processors.push(Box::new(move |s, e: E| {use std::convert::TryInto;(e.try_into().ok() as Option<A>).map(|a| f(s, a))}));}pub fn process(&self, s: &mut S, e: E) -> T {for processor in self.processors.iter() {match processor(s, e.clone()) {Some(t) => return t,None => continue,}}(*self.default)(s, e)}} - edit in src/main.rs at line 34
#[allow(clippy::type_complexity)] - replacement in src/main.rs at line 98
.body(Body::from(format!("Accepted"))).body(Body::from("Accepted".to_string())) - replacement in src/main.rs at line 104
.body(Body::from(format!("Cann't send command"))).body(Body::from("Cann't send command".to_string())) - replacement in src/main.rs at line 124
.body(Body::from(format!("Accepted"))).body(Body::from("Accepted".to_string())) - replacement in src/main.rs at line 130
.body(Body::from(format!("Cann't send command"))).body(Body::from("Cann't send command".to_string())) - replacement in src/main.rs at line 157
.body(Body::from(format!("Accepted"))).body(Body::from("Accepted".to_string())) - replacement in src/main.rs at line 163
.body(Body::from(format!("Cann't send command"))).body(Body::from("Cann't send command".to_string())) - replacement in src/main.rs at line 186
.body(Body::from(format!("Accepted"))).body(Body::from("Accepted".to_string())) - replacement in src/main.rs at line 192
.body(Body::from(format!("Cann't send command"))).body(Body::from("Cann't send command".to_string())) - edit in src/main.rs at line 224
#[allow(clippy::type_complexity)]