bus: Fix naming for filtered pop functions

This commit is contained in:
Sebastian Dröge 2019-05-11 15:43:32 +02:00 committed by Sebastian Dröge
parent 1a65c674a9
commit c282f34c74

View file

@ -198,7 +198,11 @@ impl Bus {
.filter(move |msg| msg_types.contains(&msg.get_type())) .filter(move |msg| msg_types.contains(&msg.get_type()))
} }
pub fn pop_filtered(&self, timeout: ::ClockTime, msg_types: &[MessageType]) -> Option<Message> { pub fn timed_pop_filtered(
&self,
timeout: ::ClockTime,
msg_types: &[MessageType],
) -> Option<Message> {
loop { loop {
let msg = self.timed_pop(timeout)?; let msg = self.timed_pop(timeout)?;
if msg_types.contains(&msg.get_type()) { if msg_types.contains(&msg.get_type()) {
@ -207,7 +211,7 @@ impl Bus {
} }
} }
pub fn timed_pop_filtered(&self, msg_types: &[MessageType]) -> Option<Message> { pub fn pop_filtered(&self, msg_types: &[MessageType]) -> Option<Message> {
loop { loop {
let msg = self.pop()?; let msg = self.pop()?;
if msg_types.contains(&msg.get_type()) { if msg_types.contains(&msg.get_type()) {