diff options
| author | ozpv <39195175+ozpv@users.noreply.github.com> | 2026-05-18 01:58:17 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-18 01:58:17 -0500 |
| commit | 20414d4b6ab6d1177d8008ee987931c9e4ee65d3 (patch) | |
| tree | f42ca554244154342c8d9ba334fa57d94dea3974 /src/window_size.rs | |
| parent | bc9ad151dbf478cdb39040524a50c9d901ef018b (diff) | |
a few updates
Diffstat (limited to 'src/window_size.rs')
| -rw-r--r-- | src/window_size.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/window_size.rs b/src/window_size.rs index bfc3957..620a307 100644 --- a/src/window_size.rs +++ b/src/window_size.rs @@ -1,8 +1,8 @@ /// The max value of the custom window size is `u32::MAX`. +/// The min value of the custom window size is `WindowSize::Size256`. /// This is because it's the maximum latency one can report to a CLAP host. #[derive(Debug, PartialEq)] pub enum WindowSize { - Size128, Size256, Size512, Size1024, @@ -16,10 +16,9 @@ pub enum WindowSize { impl From<usize> for WindowSize { fn from(item: usize) -> Self { - let item = item.clamp(0, u32::MAX as usize); + let item = item.clamp(256, u32::MAX as usize); match item { - 128 => Self::Size128, 256 => Self::Size256, 512 => Self::Size512, 1024 => Self::Size1024, @@ -36,7 +35,6 @@ impl From<usize> for WindowSize { impl WindowSize { pub fn as_str(&self) -> &'static str { match self { - Self::Size128 => "128", Self::Size256 => "256", Self::Size512 => "512", Self::Size1024 => "1024", @@ -51,7 +49,6 @@ impl WindowSize { pub fn inner(&self) -> usize { match self { - Self::Size128 => 128, Self::Size256 => 256, Self::Size512 => 512, Self::Size1024 => 1024, @@ -66,7 +63,6 @@ impl WindowSize { pub fn iter() -> impl Iterator<Item = Self> { [ - Self::Size128, Self::Size256, Self::Size512, Self::Size1024, |
