Skip to content

Commit 2b9e643

Browse files
committed
Fix lints
1 parent 5a32895 commit 2b9e643

File tree

1 file changed

+23
-23
lines changed
  • crates/ironrdp-rdpdr/src/pdu

1 file changed

+23
-23
lines changed

crates/ironrdp-rdpdr/src/pdu/efs.rs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -921,33 +921,33 @@ impl ServerDeviceAnnounceResponse {
921921
#[derive(Debug, PartialEq, Copy, Clone)]
922922
#[repr(u32)]
923923
pub enum NtStatus {
924-
Success = 0x00000000,
925-
Unsuccessful = 0xC0000001,
926-
NotImplemented = 0xC0000002,
927-
NoMoreFiles = 0x80000006,
928-
ObjectNameCollision = 0xC0000035,
929-
AccessDenied = 0xC0000022,
930-
NotADirectory = 0xC0000103,
931-
NoSuchFile = 0xC000000F,
932-
NotSupported = 0xC00000BB,
933-
DirectoryNotEmpty = 0xC0000101,
934-
}
935-
936-
impl std::convert::TryFrom<u32> for NtStatus {
924+
Success = 0x0000_0000,
925+
Unsuccessful = 0xC000_0001,
926+
NotImplemented = 0xC000_0002,
927+
NoMoreFiles = 0x8000_0006,
928+
ObjectNameCollision = 0xC000_0035,
929+
AccessDenied = 0xC000_0022,
930+
NotADirectory = 0xC000_0103,
931+
NoSuchFile = 0xC000_000F,
932+
NotSupported = 0xC000_00BB,
933+
DirectoryNotEmpty = 0xC000_0101,
934+
}
935+
936+
impl TryFrom<u32> for NtStatus {
937937
type Error = PduError;
938938

939939
fn try_from(value: u32) -> Result<Self, Self::Error> {
940940
match value {
941-
0x00000000 => Ok(NtStatus::Success),
942-
0xC0000001 => Ok(NtStatus::Unsuccessful),
943-
0xC0000002 => Ok(NtStatus::NotImplemented),
944-
0x80000006 => Ok(NtStatus::NoMoreFiles),
945-
0xC0000035 => Ok(NtStatus::ObjectNameCollision),
946-
0xC0000022 => Ok(NtStatus::AccessDenied),
947-
0xC0000103 => Ok(NtStatus::NotADirectory),
948-
0xC000000F => Ok(NtStatus::NoSuchFile),
949-
0xC00000BB => Ok(NtStatus::NotSupported),
950-
0xC0000101 => Ok(NtStatus::DirectoryNotEmpty),
941+
0x0000_0000 => Ok(NtStatus::Success),
942+
0xC000_0001 => Ok(NtStatus::Unsuccessful),
943+
0xC000_0002 => Ok(NtStatus::NotImplemented),
944+
0x8000_0006 => Ok(NtStatus::NoMoreFiles),
945+
0xC000_0035 => Ok(NtStatus::ObjectNameCollision),
946+
0xC000_0022 => Ok(NtStatus::AccessDenied),
947+
0xC000_0103 => Ok(NtStatus::NotADirectory),
948+
0xC000_000F => Ok(NtStatus::NoSuchFile),
949+
0xC000_00BB => Ok(NtStatus::NotSupported),
950+
0xC000_0101 => Ok(NtStatus::DirectoryNotEmpty),
951951
_ => Err(invalid_message_err!("try_from", "NtStatus", "unsupported value")),
952952
}
953953
}

0 commit comments

Comments
 (0)