Skip to content

Commit

Permalink
better dmds world declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
JieningYu committed Dec 29, 2023
1 parent 08390be commit 929a0a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 6 additions & 10 deletions src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,14 @@ fn router() -> (Global<MemStorage>, Router) {
let state = Global {
smtp_transport: Arc::new(config.smtp.to_transport().unwrap()),
worlds: Arc::new(crate::Worlds {
account: world!(MemStorage::new(), 1152921504606846976 | ..=u64::MAX),
unverified_account: world!(MemStorage::new(), 4611686018427387904 | ..=u64::MAX),
account: world!(MemStorage::new(), u64::MAX as usize / 16 => ..),
unverified_account: world!(MemStorage::new(), u64::MAX as usize / 4 => ..),
post: world!(
MemStorage::new(),
// 16 chunks
1152921504606846976 | ..=u64::MAX,
// 4 chunks
92 | ..=367,
// 4 chunks
4611686018427387904 | ..=u64::MAX,
// 2 chunks
1 | ..=1
u64::MAX as usize / 16 => ..,
368 / 4 => ..=367,
u64::MAX as usize / 4 => ..,
1 => ..=1
),
}),
config: Arc::new(config),
Expand Down

0 comments on commit 929a0a3

Please sign in to comment.