mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-06-18 20:57:35 +02:00
Formatting
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
This commit is contained in:
parent
bb4baf7fae
commit
824f5b12ce
@ -46,16 +46,16 @@ pub fn default_snapshot_settings_for_test<'a>(
|
|||||||
fn uuid_in_json_key_redaction(content: Content, _content_path: ContentPath) -> Content {
|
fn uuid_in_json_key_redaction(content: Content, _content_path: ContentPath) -> Content {
|
||||||
match content {
|
match content {
|
||||||
Content::Map(map) => {
|
Content::Map(map) => {
|
||||||
let new_map = map.iter()
|
let new_map = map
|
||||||
.map(|(key, value)| {
|
.iter()
|
||||||
match key {
|
.map(|(key, value)| match key {
|
||||||
Content::String(s) => {
|
Content::String(s) => {
|
||||||
let uuid_replaced = UUID_IN_MESSAGE_RE.replace_all(s, "[uuid]");
|
let uuid_replaced = UUID_IN_MESSAGE_RE.replace_all(s, "[uuid]");
|
||||||
(Content::String(uuid_replaced.to_string()), value.clone())
|
(Content::String(uuid_replaced.to_string()), value.clone())
|
||||||
}
|
|
||||||
_ => (key.clone(), value.clone()),
|
|
||||||
}
|
}
|
||||||
}).collect();
|
_ => (key.clone(), value.clone()),
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
Content::Map(new_map)
|
Content::Map(new_map)
|
||||||
}
|
}
|
||||||
_ => content,
|
_ => content,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user