clippy: Fix single_match warnings (#31876)

This commit is contained in:
Oluwatobi Sofela 2024-03-26 15:01:10 +01:00 committed by GitHub
parent d16f259e1d
commit b71de92569
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 115 additions and 133 deletions

View file

@ -354,11 +354,10 @@ impl AudioNodeMethods for AudioNode {
return Ok(());
}
match self.upcast::<EventTarget>().type_id() {
EventTargetTypeId::AudioNode(AudioNodeTypeId::ChannelSplitterNode) => {
return Err(Error::InvalidState);
},
_ => (),
if let EventTargetTypeId::AudioNode(AudioNodeTypeId::ChannelSplitterNode) =
self.upcast::<EventTarget>().type_id()
{
return Err(Error::InvalidState);
};
self.channel_interpretation.set(value);