aboutsummaryrefslogtreecommitdiff
path: root/src/message/signalproxy
diff options
context:
space:
mode:
Diffstat (limited to 'src/message/signalproxy')
-rw-r--r--src/message/signalproxy/heartbeat.rs4
-rw-r--r--src/message/signalproxy/initdata.rs4
-rw-r--r--src/message/signalproxy/initrequest.rs6
-rw-r--r--src/message/signalproxy/rpccall/bufferinfo.rs2
-rw-r--r--src/message/signalproxy/rpccall/client.rs2
-rw-r--r--src/message/signalproxy/rpccall/identity.rs10
-rw-r--r--src/message/signalproxy/rpccall/message.rs10
-rw-r--r--src/message/signalproxy/rpccall/mod.rs2
-rw-r--r--src/message/signalproxy/rpccall/network.rs10
-rw-r--r--src/message/signalproxy/rpccall/objectrenamed.rs6
-rw-r--r--src/message/signalproxy/rpccall/passwordchange.rs12
-rw-r--r--src/message/signalproxy/syncmessage.rs7
12 files changed, 39 insertions, 36 deletions
diff --git a/src/message/signalproxy/heartbeat.rs b/src/message/signalproxy/heartbeat.rs
index e7d17f3..920efe2 100644
--- a/src/message/signalproxy/heartbeat.rs
+++ b/src/message/signalproxy/heartbeat.rs
@@ -27,7 +27,7 @@ impl Deserialize for HeartBeat {
Ok((
size,
Self {
- timestamp: res.remove(0).try_into().unwrap(),
+ timestamp: res.remove(0).try_into()?,
},
))
}
@@ -57,7 +57,7 @@ impl Deserialize for HeartBeatReply {
Ok((
size,
Self {
- timestamp: res.remove(0).try_into().unwrap(),
+ timestamp: res.remove(0).try_into()?,
},
))
}
diff --git a/src/message/signalproxy/initdata.rs b/src/message/signalproxy/initdata.rs
index c2ca6c6..e693971 100644
--- a/src/message/signalproxy/initdata.rs
+++ b/src/message/signalproxy/initdata.rs
@@ -32,8 +32,8 @@ impl Deserialize for InitData {
res.remove(0);
- let class_name: String = res.remove(0).try_into().unwrap();
- let object_name: String = res.remove(0).try_into().unwrap();
+ let class_name: String = res.remove(0).try_into()?;
+ let object_name: String = res.remove(0).try_into()?;
Ok((
size,
diff --git a/src/message/signalproxy/initrequest.rs b/src/message/signalproxy/initrequest.rs
index 592a703..ad6a3f2 100644
--- a/src/message/signalproxy/initrequest.rs
+++ b/src/message/signalproxy/initrequest.rs
@@ -29,9 +29,11 @@ impl Deserialize for InitRequest {
Ok((
size,
Self {
- class_name: res.remove(0).try_into().unwrap(),
- object_name: res.remove(0).try_into().unwrap(),
+ class_name: res.remove(0).try_into()?,
+ object_name: res.remove(0).try_into()?,
},
))
}
}
+
+
diff --git a/src/message/signalproxy/rpccall/bufferinfo.rs b/src/message/signalproxy/rpccall/bufferinfo.rs
index cc8ad3a..762cb4d 100644
--- a/src/message/signalproxy/rpccall/bufferinfo.rs
+++ b/src/message/signalproxy/rpccall/bufferinfo.rs
@@ -28,7 +28,7 @@ impl RpcCallType for BufferInfoUpdated {
Ok((
size,
Self {
- buffer: input.remove(0).try_into().unwrap(),
+ buffer: input.remove(0).try_into()?,
}
.into(),
))
diff --git a/src/message/signalproxy/rpccall/client.rs b/src/message/signalproxy/rpccall/client.rs
index 7e31135..13653b9 100644
--- a/src/message/signalproxy/rpccall/client.rs
+++ b/src/message/signalproxy/rpccall/client.rs
@@ -29,7 +29,7 @@ impl RpcCallType for KickClient {
Ok((
size,
Self {
- id: input.remove(0).try_into().unwrap(),
+ id: input.remove(0).try_into()?,
}
.into(),
))
diff --git a/src/message/signalproxy/rpccall/identity.rs b/src/message/signalproxy/rpccall/identity.rs
index 15beec4..8927f1c 100644
--- a/src/message/signalproxy/rpccall/identity.rs
+++ b/src/message/signalproxy/rpccall/identity.rs
@@ -34,8 +34,8 @@ impl RpcCallType for CreateIdentity {
Ok((
size,
CreateIdentity {
- identity: input.remove(0).try_into().unwrap(),
- additional: input.remove(0).try_into().unwrap(),
+ identity: input.remove(0).try_into()?,
+ additional: input.remove(0).try_into()?,
}
.into(),
))
@@ -68,7 +68,7 @@ impl RpcCallType for RemoveIdentity {
Ok((
size,
Self {
- identity_id: input.remove(0).try_into().unwrap(),
+ identity_id: input.remove(0).try_into()?,
}
.into(),
))
@@ -101,7 +101,7 @@ impl RpcCallType for IdentityCreated {
Ok((
size,
IdentityCreated {
- identity: input.remove(0).try_into().unwrap(),
+ identity: input.remove(0).try_into()?,
}
.into(),
))
@@ -134,7 +134,7 @@ impl RpcCallType for IdentityRemoved {
Ok((
size,
Self {
- identity_id: input.remove(0).try_into().unwrap(),
+ identity_id: input.remove(0).try_into()?,
}
.into(),
))
diff --git a/src/message/signalproxy/rpccall/message.rs b/src/message/signalproxy/rpccall/message.rs
index bf0629a..9550658 100644
--- a/src/message/signalproxy/rpccall/message.rs
+++ b/src/message/signalproxy/rpccall/message.rs
@@ -29,7 +29,7 @@ impl RpcCallType for DisplayMessage {
Ok((
size,
RpcCall::DisplayMessage(DisplayMessage {
- message: input.remove(0).try_into().unwrap(),
+ message: input.remove(0).try_into()?,
}),
))
}
@@ -64,8 +64,8 @@ impl RpcCallType for DisplayStatusMessage {
Ok((
size,
DisplayStatusMessage {
- network: input.remove(0).try_into().unwrap(),
- message: input.remove(0).try_into().unwrap(),
+ network: input.remove(0).try_into()?,
+ message: input.remove(0).try_into()?,
}
.into(),
))
@@ -100,8 +100,8 @@ impl RpcCallType for SendInput {
Ok((
size,
Self {
- buffer: input.remove(0).try_into().unwrap(),
- message: input.remove(0).try_into().unwrap(),
+ buffer: input.remove(0).try_into()?,
+ message: input.remove(0).try_into()?,
}
.into(),
))
diff --git a/src/message/signalproxy/rpccall/mod.rs b/src/message/signalproxy/rpccall/mod.rs
index 2a3e7b1..3d869d2 100644
--- a/src/message/signalproxy/rpccall/mod.rs
+++ b/src/message/signalproxy/rpccall/mod.rs
@@ -110,7 +110,7 @@ impl Deserialize for RpcCall {
res.remove(0);
- let rpc: String = res.remove(0).try_into().unwrap();
+ let rpc: String = res.remove(0).try_into()?;
match rpc.as_str() {
DisplayMessage::NAME => DisplayMessage::from_network(size, &mut res),
diff --git a/src/message/signalproxy/rpccall/network.rs b/src/message/signalproxy/rpccall/network.rs
index 738dddf..95315c1 100644
--- a/src/message/signalproxy/rpccall/network.rs
+++ b/src/message/signalproxy/rpccall/network.rs
@@ -33,8 +33,8 @@ impl RpcCallType for CreateNetwork {
Ok((
size,
Self {
- network: input.remove(0).try_into().unwrap(),
- channels: input.remove(0).try_into().unwrap(),
+ network: input.remove(0).try_into()?,
+ channels: input.remove(0).try_into()?,
}
.into(),
))
@@ -67,7 +67,7 @@ impl RpcCallType for RemoveNetwork {
Ok((
size,
Self {
- network_id: input.remove(0).try_into().unwrap(),
+ network_id: input.remove(0).try_into()?,
}
.into(),
))
@@ -100,7 +100,7 @@ impl RpcCallType for NetworkCreated {
Ok((
size,
Self {
- network_id: input.remove(0).try_into().unwrap(),
+ network_id: input.remove(0).try_into()?,
}
.into(),
))
@@ -133,7 +133,7 @@ impl RpcCallType for NetworkRemoved {
Ok((
size,
Self {
- network_id: input.remove(0).try_into().unwrap(),
+ network_id: input.remove(0).try_into()?,
}
.into(),
))
diff --git a/src/message/signalproxy/rpccall/objectrenamed.rs b/src/message/signalproxy/rpccall/objectrenamed.rs
index 1d698ef..bcef760 100644
--- a/src/message/signalproxy/rpccall/objectrenamed.rs
+++ b/src/message/signalproxy/rpccall/objectrenamed.rs
@@ -33,9 +33,9 @@ impl RpcCallType for ObjectRenamed {
Ok((
size,
Self {
- classname: input.remove(0).try_into().unwrap(),
- oldname: input.remove(0).try_into().unwrap(),
- newname: input.remove(0).try_into().unwrap(),
+ classname: input.remove(0).try_into()?,
+ oldname: input.remove(0).try_into()?,
+ newname: input.remove(0).try_into()?,
}
.into(),
))
diff --git a/src/message/signalproxy/rpccall/passwordchange.rs b/src/message/signalproxy/rpccall/passwordchange.rs
index 16bf78f..6affc44 100644
--- a/src/message/signalproxy/rpccall/passwordchange.rs
+++ b/src/message/signalproxy/rpccall/passwordchange.rs
@@ -38,10 +38,10 @@ impl RpcCallType for ChangePassword {
Ok((
size,
Self {
- peer: input.remove(0).try_into().unwrap(),
- user: input.remove(0).try_into().unwrap(),
- before: input.remove(0).try_into().unwrap(),
- after: input.remove(0).try_into().unwrap(),
+ peer: input.remove(0).try_into()?,
+ user: input.remove(0).try_into()?,
+ before: input.remove(0).try_into()?,
+ after: input.remove(0).try_into()?,
}
.into(),
))
@@ -79,8 +79,8 @@ impl RpcCallType for PasswordChanged {
Ok((
size,
Self {
- peer: input.remove(0).try_into().unwrap(),
- success: input.remove(0).try_into().unwrap(),
+ peer: input.remove(0).try_into()?,
+ success: input.remove(0).try_into()?,
}
.into(),
))
diff --git a/src/message/signalproxy/syncmessage.rs b/src/message/signalproxy/syncmessage.rs
index b124d07..d38ea20 100644
--- a/src/message/signalproxy/syncmessage.rs
+++ b/src/message/signalproxy/syncmessage.rs
@@ -109,16 +109,17 @@ impl Deserialize for SyncMessage {
res.remove(0);
- let class_name: String = res.remove(0).try_into().unwrap();
+ let class_name: String = res.remove(0).try_into()?;
Ok((
size,
Self {
class_name: Class::from(class_name),
- object_name: res.remove(0).try_into().unwrap(),
- slot_name: res.remove(0).try_into().unwrap(),
+ object_name: res.remove(0).try_into()?,
+ slot_name: res.remove(0).try_into()?,
params: res,
},
))
}
}
+