Skip to content

Commit

Permalink
change SDP.attribute to Opton<&str>
Browse files Browse the repository at this point in the history
  • Loading branch information
yngrtc committed Feb 17, 2024
1 parent 22defe6 commit b7b2a63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdp/src/description/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ impl SessionDescription {
}

/// Attribute returns the value of an attribute and if it exists
pub fn attribute(&self, key: &str) -> Option<&String> {
pub fn attribute(&self, key: &str) -> Option<&str> {
for a in &self.attributes {
if a.key == key {
return a.value.as_ref();
return a.value.as_ref().map(|x| x.as_str());
}
}
None
Expand Down

0 comments on commit b7b2a63

Please sign in to comment.