mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
minidom: Don't borrow prefix in Prefixes.get
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
1f2d7aa99d
commit
770dff7cb0
2 changed files with 3 additions and 3 deletions
|
@ -1093,7 +1093,7 @@ mod tests {
|
|||
assert_eq!(elem.name(), String::from("bar"));
|
||||
assert_eq!(elem.ns(), String::from("ns1"));
|
||||
// Ensure the prefix is properly added to the store
|
||||
assert_eq!(elem.prefixes.get(Some(String::from("foo"))), Some(&String::from("ns1")));
|
||||
assert_eq!(elem.prefixes.get(&Some(String::from("foo"))), Some(&String::from("ns1")));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -49,8 +49,8 @@ impl Prefixes {
|
|||
&self.prefixes
|
||||
}
|
||||
|
||||
pub fn get(&self, prefix: Prefix) -> Option<&Namespace> {
|
||||
self.prefixes.get(&prefix)
|
||||
pub fn get(&self, prefix: &Prefix) -> Option<&Namespace> {
|
||||
self.prefixes.get(prefix)
|
||||
}
|
||||
|
||||
pub(crate) fn insert<S: Into<Namespace>>(&mut self, prefix: Prefix, namespace: S) {
|
||||
|
|
Loading…
Reference in a new issue