mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
switch to rust 2024
This commit is contained in:
parent
74b497cf3a
commit
f87a5c14f9
7 changed files with 12 additions and 12 deletions
|
|
@ -54,10 +54,10 @@ impl<'j> Jack<'j> {
|
|||
/// Run something with the client.
|
||||
pub fn with_client <T> (&self, op: impl FnOnce(&Client)->T) -> T {
|
||||
match &*self.0.read().unwrap() {
|
||||
Inert => panic!("jack client not activated"),
|
||||
Inactive(ref client) => op(client),
|
||||
Activating => panic!("jack client has not finished activation"),
|
||||
Active(ref client) => op(client.as_client()),
|
||||
Inert => panic!("jack client not activated"),
|
||||
Inactive(client) => op(client),
|
||||
Activating => panic!("jack client has not finished activation"),
|
||||
Active(client) => op(client.as_client()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue