Skip to content

Commit

Permalink
dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
copy committed May 10, 2024
1 parent cf6b340 commit 7891763
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/rust/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ pub trait SafeToU8 {
pub trait SafeToU16 {
fn safe_to_u16(self) -> u16;
}
pub trait SafeToI32 {
fn safe_to_i32(self) -> i32;
}

impl SafeToU8 for u16 {
fn safe_to_u8(self) -> u8 {
Expand Down Expand Up @@ -57,20 +54,6 @@ impl SafeToU16 for usize {
}
}

impl SafeToI32 for u32 {
fn safe_to_i32(self) -> i32 {
dbg_assert!(self <= ::std::i32::MAX as u32);
self as i32
}
}

impl SafeToI32 for usize {
fn safe_to_i32(self) -> i32 {
dbg_assert!(self <= ::std::i32::MAX as usize);
self as i32
}
}

#[allow(dead_code)]
pub const DEBUG: bool = cfg!(debug_assertions);

Expand Down

0 comments on commit 7891763

Please sign in to comment.