Update several dependencies

This commit is contained in:
2026-07-13 23:03:35 -04:00
parent 2ce0edee76
commit c7628c42d8
7 changed files with 424 additions and 705 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ use std::time::Duration;
use anyhow::{Result, bail};
use audioadapter_buffers::direct::InterleavedSlice;
use cpal::traits::{DeviceTrait, HostTrait, StreamTrait};
use rubato::Resampler;
use rubato::{Adjustable as _, Resampler};
use tracing::error;
pub struct Audio {
+10 -6
View File
@@ -1,6 +1,6 @@
use std::{
fmt::{Display, UpperHex},
ops::{Bound, Deref, DerefMut, RangeBounds},
ops::{AddAssign, Bound, Deref, DerefMut, MulAssign, RangeBounds},
str::FromStr,
};
@@ -10,7 +10,7 @@ use egui::{
RichText, Sense, Shape, Stroke, StrokeKind, TextEdit, Ui, UiBuilder, Vec2, Widget, WidgetText,
ecolor::HexColor, util::id_type_map::SerializableAny,
};
use num_traits::{CheckedAdd, CheckedSub, One};
use num_traits::{CheckedAdd, CheckedSub, One, Zero};
pub trait UiExt {
fn section(&mut self, title: impl Into<String>, add_contents: impl FnOnce(&mut Ui));
@@ -105,14 +105,16 @@ enum Direction {
pub trait Number:
Copy
+ Zero
+ One
+ AddAssign
+ MulAssign
+ CheckedAdd
+ CheckedSub
+ Eq
+ Ord
+ Display
+ FromStr
+ FromRadix16
+ UpperHex
+ Send
+ Sync
@@ -121,14 +123,16 @@ pub trait Number:
}
impl<
T: Copy
+ Zero
+ One
+ AddAssign
+ MulAssign
+ CheckedAdd
+ CheckedSub
+ Eq
+ Ord
+ Display
+ FromStr
+ FromRadix16
+ UpperHex
+ Send
+ Sync
@@ -209,8 +213,8 @@ impl<T: Number> Widget for NumberEdit<'_, T> {
let from_string = |val: &str| {
if self.hex {
let bytes = val.as_bytes();
let (result, consumed) = T::from_radix_16(bytes);
(consumed == bytes.len()).then_some(result)
let (result, consumed) = atoi::Integer::<T>::from_radix_16(bytes);
(consumed == bytes.len()).then_some(result.0)
} else {
val.parse::<T>().ok()
}