mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-24 23:43:18 +00:00
Fix misleading doc comment on JsonObject::as_map
The previous comment said the method returned "a clone … in a Value::Object", but it actually returns a plain reference to the underlying BTreeMap. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
7d5dc63cd6
commit
e6f7bf5bc3
1 file changed
+1
-2
@@ -212,8 +212,7 @@ impl JsonObject {
|
||||
self.object.get(key)
|
||||
}
|
||||
|
||||
/// Returns a `serde_json::Value::Object` containing a clone of this
|
||||
/// object's entries.
|
||||
/// Returns a reference to the underlying map of this object's entries.
|
||||
pub fn as_map(&self) -> &BTreeMap<Box<str>, Value> {
|
||||
&self.object
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user