clippy: Fix all errors in components/script (#31911)

* clippy: Fix errors in components/script/dom

* clippy: fixed remaining errors in components/script
This commit is contained in:
Azhar Ismagulova 2024-03-28 09:03:18 +00:00 committed by GitHub
parent eccb60e548
commit f183170786
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 57 additions and 57 deletions

View file

@ -404,9 +404,9 @@ impl BaseAudioContextMethods for BaseAudioContext {
length: u32,
sample_rate: Finite<f32>,
) -> Fallible<DomRoot<AudioBuffer>> {
if number_of_channels <= 0 ||
if number_of_channels == 0 ||
number_of_channels > MAX_CHANNEL_COUNT ||
length <= 0 ||
length == 0 ||
*sample_rate <= 0.
{
return Err(Error::NotSupported);