mirror of
https://github.com/cubixle/radius-rs.git
synced 2026-04-30 19:28:46 +01:00
Remove PartialEq from error enum
This commit is contained in:
@@ -158,7 +158,12 @@ mod tests {
|
|||||||
rfc2865::add_user_name(&mut req_packet, "admin");
|
rfc2865::add_user_name(&mut req_packet, "admin");
|
||||||
rfc2865::add_user_password(&mut req_packet, b"p@ssw0rd").unwrap();
|
rfc2865::add_user_password(&mut req_packet, b"p@ssw0rd").unwrap();
|
||||||
let res = client.send_packet(&remote_addr, &req_packet).await;
|
let res = client.send_packet(&remote_addr, &req_packet).await;
|
||||||
assert_eq!(res.unwrap_err(), ClientError::SocketTimeoutError());
|
|
||||||
|
let err = res.unwrap_err();
|
||||||
|
match err {
|
||||||
|
ClientError::SocketTimeoutError() => {}
|
||||||
|
_ => panic!("unexpected error: {}", err),
|
||||||
|
}
|
||||||
|
|
||||||
sender.send(()).unwrap();
|
sender.send(()).unwrap();
|
||||||
server_proc.await.unwrap();
|
server_proc.await.unwrap();
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ use crate::client::ClientError::{
|
|||||||
FailedReceivingResponse, FailedSendingPacket, FailedUdpSocketBinding,
|
FailedReceivingResponse, FailedSendingPacket, FailedUdpSocketBinding,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Error, PartialEq, Debug)]
|
#[derive(Error, Debug)]
|
||||||
pub enum ClientError {
|
pub enum ClientError {
|
||||||
#[error("failed to bind a UDP socket => `{0}`")]
|
#[error("failed to bind a UDP socket => `{0}`")]
|
||||||
FailedUdpSocketBinding(String),
|
FailedUdpSocketBinding(String),
|
||||||
|
|||||||
Reference in New Issue
Block a user