Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit 55ecfc8

Browse files
committed
make all errors non_exhaustive
1 parent ff8ea77 commit 55ecfc8

File tree

5 files changed

+5
-2
lines changed

5 files changed

+5
-2
lines changed

src/auth/guard_data.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub trait GuardDataStore {
2626

2727
/// Error while storing or loading guard data from json file
2828
#[derive(Debug, Error)]
29+
#[non_exhaustive]
2930
pub enum FileStoreError {
3031
/// Error while reading the json file
3132
#[error("error while reading tokens from {}: {:#}", path.display(), err)]

src/eresult.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use std::convert::TryFrom;
33

44
#[derive(TryFromPrimitive, Debug, Copy, Clone)]
55
#[repr(i32)]
6+
#[non_exhaustive]
67
pub enum EResult {
78
Invalid = 0,
89
OK = 1,

src/message.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ impl MalformedBody {
3333
}
3434

3535
#[derive(Error, Debug)]
36+
#[non_exhaustive]
3637
pub enum MessageBodyError {
3738
#[error("{0}")]
3839
Protobuf(#[from] protobuf::Error),
@@ -42,8 +43,6 @@ pub enum MessageBodyError {
4243
IO(#[from] std::io::Error),
4344
#[error("{0}")]
4445
Other(String),
45-
#[error("malformed child: {0}")]
46-
MalformedChild(Box<NetworkError>),
4746
#[error("malformed big int: {0:#}")]
4847
BigInt(#[from] ParseBigIntError),
4948
#[error("invalid rsa key: {0:#}")]

src/net.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use tracing::{debug, trace};
1717
pub const PROTO_MASK: u32 = 0x80000000;
1818

1919
#[derive(Debug, Error)]
20+
#[non_exhaustive]
2021
pub enum NetworkError {
2122
#[error("{0}")]
2223
IO(#[from] std::io::Error),

src/serverlist.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use thiserror::Error;
99
use tracing::debug;
1010

1111
#[derive(Debug, Error)]
12+
#[non_exhaustive]
1213
pub enum ServerDiscoveryError {
1314
#[error("Failed send discovery request: {0:#}")]
1415
Network(reqwest::Error),

0 commit comments

Comments
 (0)