From 5b41bdb1dd7f5b554ad5a1d23ef3026663773d94 Mon Sep 17 00:00:00 2001 From: vindard <17693119+vindard@users.noreply.github.com> Date: Wed, 15 Jan 2025 23:59:55 -0400 Subject: [PATCH] chore: reduce account code width --- core/chart-of-accounts/src/path/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/chart-of-accounts/src/path/mod.rs b/core/chart-of-accounts/src/path/mod.rs index 334d37a4d..c8d7487f3 100644 --- a/core/chart-of-accounts/src/path/mod.rs +++ b/core/chart-of-accounts/src/path/mod.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; use super::primitives::{ChartId, DebitOrCredit}; use error::*; -const ENCODED_PATH_WIDTH: usize = 8; +const ENCODED_PATH_WIDTH: usize = 5; #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Hash, Deserialize)] pub struct AccountIdx(u64); @@ -25,7 +25,6 @@ impl From for AccountIdx { impl AccountIdx { pub const FIRST: Self = Self(1); pub const MAX_TWO_DIGIT: Self = Self(99); - pub const MAX_THREE_DIGIT: Self = Self(999); pub const fn next(&self) -> Self { Self(self.0 + 1)