Skip to content

Commit

Permalink
Rename Rids::expects() -> contains()
Browse files Browse the repository at this point in the history
  • Loading branch information
algesten committed Jan 10, 2025
1 parent c224d0b commit bfc2740
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/media/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub enum Rids {
}

impl Rids {
pub(crate) fn expects(&self, rid: Rid) -> bool {
pub(crate) fn contains(&self, rid: Rid) -> bool {
match self {
Rids::Any => true,
Rids::Specific(v) => v.contains(&rid),
Expand Down
2 changes: 1 addition & 1 deletion src/media/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl<'a> Writer<'a> {
}

if let Some(rid) = self.rid {
if !media.rids_rx().expects(rid) && media.rids_rx().is_specific() {
if !media.rids_rx().contains(rid) && media.rids_rx().is_specific() {
return Err(RtcError::UnknownRid(rid));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/streams/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl Streams {
.expect("map_dynamic_by_rid to be called with Rid");

// Check if the mid/rid combo is not expected
if !media.rids_rx().expects(rid) {
if !media.rids_rx().contains(rid) {
trace!("Mid does not expect rid: {} {}", midrid.mid(), rid);
return;
}
Expand Down

0 comments on commit bfc2740

Please sign in to comment.