Skip to content

Commit 939dfe5

Browse files
authored
refactor: replace hardcoded candidate with defined constant (#56)
1 parent b808b74 commit 939dfe5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rtc-sdp/src/description/common.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use std::fmt;
22

3+
use super::session::ATTR_KEY_CANDIDATE;
4+
35
/// Information describes the "i=" field which provides textual information
46
/// about the session.
57
pub type Information = String;
@@ -89,6 +91,6 @@ impl Attribute {
8991

9092
/// is_ice_candidate returns true if the attribute key equals "candidate".
9193
pub fn is_ice_candidate(&self) -> bool {
92-
self.key.as_str() == "candidate"
94+
self.key.as_str() == ATTR_KEY_CANDIDATE
9395
}
9496
}

0 commit comments

Comments
 (0)