Cleanup most warnings
[?]
Sep 29, 2020, 12:42 PM
H3RWXT2VK4SMM754MZLJA5R5ZK7EHAKZN63ROSJ2V46DXDKEF7GACDependencies
- [2]
7WM64CI7Implement all previous functionality - [3]
OGMBXBKPMove online to XmppConnection - [4]
5WHNHD42Update dependencies - [5]
CCLGGFKRMove out XmppConnection into own file - [6]
OB3HA2MDUse Client::new_with_jid to parse jid only once - [7]
FWJDW3G5Allow process xmpp incoming stanzas with futures - [8]
HDLI2X4HIgnore delayed XEP-0203 messages - [9]
PBRUH4BJRename optional XmppConnection to MaybeXmppConnection - [10]
YEMBT7TBAdd support for XEP-0092: Software Version - [11]
Z3NQEYVIRename IqSetHandler to IqResuestHandler as it should provide both get and set handling - [12]
4IPZTMFIUpdate dependencies - [13]
OFLAP2G2Fix possible utf8 errors - [14]
FVVPKFTLInitial commit - [15]
JY4F7VBCUse element processor for incoming iq set - [16]
LNUU5R56Support disco#info from XEP-0030 Service Discovery - [17]
UIXIQHDYWait for commands via new processing code - [18]
RQZCVDFDImplement applying timeout for expired iq await - [19]
LL3D5CXKStaring using element processor - [20]
SH3LIQ4SStarting commands support - [21]
5IKA4GO7Rename xmpp client field from "inner" to "client" - [22]
IK3YDPTYUpdate deps - [23]
CBWCXUZZPrepare adding new items to roster - [24]
ALP2YJIURename XmppState to XmppProcessState - [25]
OANBCLN5Move xmpp client into XmppState - [26]
DYRPAV6TUpdate dependencies - [27]
ZFBPXPADCleanup timeouted iq requests with ping Output elapsed time. Refactor iq handling. - [28]
6UKCVM6EUse new iq processng for initial roster - [29]
KORYGY74Set presence to account and MUC - [30]
YTN366WASupport disco#items - [31]
S754Y5DFRefactor IQ processing Always answer to set and get requests. Use XML encoding for stanzas. - [32]
LQXBWNFTRemove unneeded requirement - [33]
GXQCDLYQUse element processor for incoming iq get - [34]
UMTLHH77Process commands in the separate function - [35]
W6GSBP3ZAdd id for presence stanzas - [36]
NDDQQP2PUpdate deps - [37]
AYQZ2UIAUpdate deps - [38]
5A5UVGNMMove receiver closing logic out of xmpp processing - [39]
AEH7WP42Make element processors static - [40]
GVZ4JAR5Process self-presence with incoming stanza processor - [41]
WDCZNZOPFix rustdoc - [42]
BYJPYYSMProcess iq ping response - [43]
HU3NZX5ZProcess self-presence via new processing code - [44]
RGOSS73UConvert self-presence to xmpp_parser's type - [45]
SSOKGGCEUpdate dependencies - [46]
ZT3YEIVXConsume connection on processing command - [47]
QDHDTOLMStarting support for commands XEP-0050: Ad-Hoc Commands (there no support in xmpp_parsers still) - [48]
RRLRZTMRUse element processor for iq - [49]
DCMDASHVMention XEP-0050 and XEP-0203 support - [50]
PJV5HPIFStarting to imlements timeouts for iqs - [51]
SU4DNVCBStart to processing roster data - [52]
U3UZTFCHRe-try to subscribe if not subscribed - [53]
VS6AHRWIMove XMPP to separate dir - [54]
2THKW66MIgnore .orig files - [55]
3DSOPLCGAdd rustdoc - [56]
PLWPCM47Add id to initital presence - [57]
NXDEBFWRSwitch to tokio 0.2 and async
Change contents
- replacement in src/xmpp/xmpp_connection.rs at line 3
use tokio_xmpp::{AsyncClient, Event, Packet};use tokio_xmpp::{AsyncClient, Event}; - replacement in src/xmpp/xmpp_connection.rs at line 496
Err(account) => {}Err(_) => {} - edit in src/xmpp/xmpp_connection.rs at line 704
let account = self.account.clone(); - replacement in src/xmpp/xmpp_connection.rs at line 746
Either::Left((stop, s)) => break (Ok(self), Either::Right(stop)),Either::Left((stop, _)) => break (Ok(self), Either::Right(stop)), - replacement in src/xmpp/xmpp_connection.rs at line 752
if (self.xmpp_processing(&event)) {if self.xmpp_processing(&event) { - replacement in src/xmpp/xmpp_connection.rs at line 841
Either::Left(((), send_future)) => None,Either::Left(((), _)) => None, - edit in src/xmpp/xmpp_connection.rs at line 1049
_ => todo!(), - replacement in src/xmpp/mod.rs at line 2
use log::{error, info, warn};use log::{info, warn}; - edit in src/xmpp/mod.rs at line 14[3.37174]→[3.60161:60162](∅→∅),[3.29910]→[3.60161:60162](∅→∅),[3.36071]→[3.60161:60162](∅→∅),[3.60161]→[3.60161:60162](∅→∅),[3.67188]→[3.38939:38971](∅→∅),[3.40648]→[3.38939:38971](∅→∅),[3.38971]→[3.86:103](∅→∅),[3.5712]→[3.86:103](∅→∅),[3.10311]→[3.86:103](∅→∅),[3.3992]→[3.86:103](∅→∅),[3.5899]→[3.86:103](∅→∅),[3.6120]→[3.86:103](∅→∅),[3.5503]→[3.86:103](∅→∅),[3.40715]→[3.86:103](∅→∅),[3.23318]→[3.86:103](∅→∅),[3.4874]→[3.86:103](∅→∅),[3.5895]→[3.86:103](∅→∅),[3.86]→[3.86:103](∅→∅),[3.103]→[3.3876:3891](∅→∅),[3.3876]→[3.3876:3891](∅→∅),[3.3891]→[3.38972:39003](∅→∅),[3.39003]→[3.3917:3920](∅→∅),[3.5772]→[3.3917:3920](∅→∅),[3.40742]→[3.3917:3920](∅→∅),[3.4053]→[3.3917:3920](∅→∅),[3.5669]→[3.3917:3920](∅→∅),[3.513]→[3.3917:3920](∅→∅),[3.4821]→[3.3917:3920](∅→∅),[3.12168]→[3.3917:3920](∅→∅),[3.8775]→[3.3917:3920](∅→∅),[3.3917]→[3.3917:3920](∅→∅),[3.3920]→[3.39004:39157](∅→∅),[3.39157]→[3.4058:4136](∅→∅),[3.5866]→[3.4058:4136](∅→∅),[3.10444]→[3.4058:4136](∅→∅),[3.4125]→[3.4058:4136](∅→∅),[3.6053]→[3.4058:4136](∅→∅),[3.6253]→[3.4058:4136](∅→∅),[3.5657]→[3.4058:4136](∅→∅),[3.40870]→[3.4058:4136](∅→∅),[3.23472]→[3.4058:4136](∅→∅),[3.5007]→[3.4058:4136](∅→∅),[3.6049]→[3.4058:4136](∅→∅),[3.4058]→[3.4058:4136](∅→∅)
struct XmppProcessState<F, S> {cmd_recv: S,signal: F,conn: MaybeXmppConnection,}impl<F, S> XmppProcessState<F, S> {fn new(cmd_recv: S, signal: F, conn: MaybeXmppConnection) -> XmppProcessState<F, S> {XmppProcessState {cmd_recv,signal,conn,}}} - replacement in src/xmpp/mod.rs at line 36
(Ok(conn), Either::Right(None)) => break Ok(()),(Ok(_), Either::Right(None)) => break Ok(()), - replacement in src/xmpp/mod.rs at line 46
(Err(acc), Either::Right(None)) => break Ok(()),(Err(_), Either::Right(None)) => break Ok(()), - 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)}} - replacement in src/main.rs at line 110
.body(Body::from(format!("Cann't get presence text"))).body(Body::from(format!("Cann't get presence text: {}", e))) - replacement in src/main.rs at line 136
.body(Body::from(format!("Cann't get chat text"))).body(Body::from(format!("Cann't get chat text: {}", e))) - replacement in src/main.rs at line 169
.body(Body::from(format!("Cann't get presence text"))).body(Body::from(format!("Cann't get presence text: {}", e))) - replacement in src/main.rs at line 198
.body(Body::from(format!("Cann't get chat text"))).body(Body::from(format!("Cann't get chat text: {}", e))) - replacement in src/main.rs at line 264
tokio::signal::ctrl_c().await;if let Err(e) = tokio::signal::ctrl_c().await {error!("Cann't wait for Ctrl+C: {}", e);} - replacement in src/main.rs at line 290
cmd_send.clone().send(XmppCommand::Ping).await;cmd_send.send(XmppCommand::TimeoutCleanup).await;if let Err(e) = cmd_send.clone().send(XmppCommand::Ping).await {error!("Cannot send ping command: {}", e);}if let Err(e) = cmd_send.send(XmppCommand::TimeoutCleanup).await {error!("Cann't send cleanup command: {}", e);} - replacement in src/main.rs at line 320
http_server.await;http_server.await?; - edit in src/main.rs at line 323
xmpp_join.join().unwrap(); - replacement in src/main.rs at line 324
Ok(())xmpp_join.join().expect("Join to xmpp thread")