From 6734d0178beda977bc09497b43d7c1a72f1b9788 Mon Sep 17 00:00:00 2001 From: Petr Gladkikh Date: Fri, 15 Nov 2024 00:33:26 +0400 Subject: [PATCH] Cleanup Make assert conditions more uniform. --- src/buffer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/buffer.rs b/src/buffer.rs index fa0c6d6e..de21fdcb 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -42,8 +42,8 @@ where where D: Into>, { - assert!(channels > 0); - assert!(sample_rate > 0); + assert!(channels >= 1); + assert!(sample_rate >= 1); let data = data.into(); let duration_ns = 1_000_000_000u64.checked_mul(data.len() as u64).unwrap()