aboutsummaryrefslogtreecommitdiff
path: root/src/message/signalproxy/rpccall
diff options
context:
space:
mode:
Diffstat (limited to 'src/message/signalproxy/rpccall')
-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
8 files changed, 27 insertions, 27 deletions
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(),
))