Skip to content

Commit

Permalink
refactor: Cease using legacy numeric constants
Browse files Browse the repository at this point in the history
  • Loading branch information
AiyionPrime committed Jun 28, 2024
1 parent d30a1ec commit 43aa6dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/src/server/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use super::constants;

pub const ANONYMOUS_USER_TOKEN_ID: &str = "ANONYMOUS";

const RECEIVE_BUFFER_SIZE: usize = std::u16::MAX as usize;
const SEND_BUFFER_SIZE: usize = std::u16::MAX as usize;
const RECEIVE_BUFFER_SIZE: usize = u16::MAX as usize;
const SEND_BUFFER_SIZE: usize = u16::MAX as usize;

#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
pub struct TcpConfig {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/types/date_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl From<DateTimeUtc> for DateTime {

impl From<i64> for DateTime {
fn from(value: i64) -> Self {
if value == i64::max_value() {
if value == i64::MAX {
// Max signifies end times
Self::endtimes()
} else {
Expand Down Expand Up @@ -315,7 +315,7 @@ impl DateTime {
return 0;
}
if nanos > Self::endtimes_ticks() {
return i64::max_value();
return i64::MAX;
}
nanos
}
Expand Down

0 comments on commit 43aa6dc

Please sign in to comment.