Merge pull request #7148 from heinrich5991/pr_ddnet_mastersrv_rawvalue

mastersrv: Go to `RawValue` directly
This commit is contained in:
Dennis Felsing 2023-09-08 09:45:09 +00:00 committed by GitHub
commit a07fd521f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -718,8 +718,7 @@ fn handle_register(
let info = i.as_object().ok_or("register info must be an object")?;
// Normalize the JSON to strip any spaces etc.
let raw_info = json::to_string(&info).unwrap();
Ok(json::value::RawValue::from_string(raw_info).unwrap())
Ok(json::value::to_raw_value(&info).unwrap())
})
.transpose()?;