Reduce the DocumentId size from 64 to 32bits

This commit is contained in:
Kerollmops
2020-05-19 13:53:31 +02:00
parent 3bca31856d
commit 788e2202c9
12 changed files with 33 additions and 32 deletions

View File

@ -105,7 +105,7 @@ pub fn discover_document_id(
{
if userid.chars().all(|x| x.is_ascii_alphanumeric() || x == '-' || x == '_') {
match user_ids.get(userid) {
Some(internal_id) => Ok(DocumentId(internal_id)),
Some(id) => Ok(DocumentId(id as u32)),
None => {
let internal_id = available_ids.next().expect("no more ids available");
Ok(internal_id)