Extract reconcile (#85)
This commit is contained in:
parent
75b020146a
commit
bb0e44f06f
1 changed files with 294 additions and 36720 deletions
11
sync-server/src/utils/normalize.rs
Normal file
11
sync-server/src/utils/normalize.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
use serde::{Deserialize, Deserializer};
|
||||
|
||||
pub fn normalize<'de, D>(deserializer: D) -> Result<String, D::Error>
|
||||
where
|
||||
D: Deserializer<'de>,
|
||||
{
|
||||
let s = String::deserialize(deserializer)?;
|
||||
Ok(normalize_string(&s))
|
||||
}
|
||||
|
||||
pub fn normalize_string(s: &str) -> String { s.trim().to_lowercase() }
|
||||
Loading…
Reference in a new issue