Replace hardcoded string with constants

This commit is contained in:
Gnosnay
2024-12-24 00:39:44 +08:00
parent fc23a0ee52
commit 44eb153619
26 changed files with 160 additions and 132 deletions

View File

@ -103,6 +103,7 @@ impl<'t, 'i> ClearDocuments<'t, 'i> {
#[cfg(test)]
mod tests {
use super::*;
use crate::constants::RESERVED_GEO_FIELD_NAME;
use crate::index::tests::TempIndex;
#[test]
@ -114,7 +115,7 @@ mod tests {
.add_documents_using_wtxn(&mut wtxn, documents!([
{ "id": 0, "name": "kevin", "age": 20 },
{ "id": 1, "name": "kevina" },
{ "id": 2, "name": "benoit", "country": "France", "_geo": { "lng": 42, "lat": 35 } }
{ "id": 2, "name": "benoit", "country": "France", RESERVED_GEO_FIELD_NAME: { "lng": 42, "lat": 35 } }
]))
.unwrap();