Skip to content

Commit

Permalink
refactor: use LazyLock
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaDve committed Jan 23, 2025
1 parent 40d966b commit 66745b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/recording.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ pub enum RecordingState {
struct BoxedResult(Rc<Result<(gio::File, gst::ClockTime)>>);

mod imp {
use std::sync::LazyLock;

use glib::subclass::Signal;
use gst::bus::BusWatchGuard;
use once_cell::sync::Lazy;

use super::*;

Expand Down Expand Up @@ -119,7 +120,7 @@ mod imp {
}

fn signals() -> &'static [glib::subclass::Signal] {
static SIGNALS: Lazy<Vec<Signal>> = Lazy::new(|| {
static SIGNALS: LazyLock<Vec<Signal>> = LazyLock::new(|| {
vec![Signal::builder("finished")
.param_types([BoxedResult::static_type()])
.build()]
Expand Down

0 comments on commit 66745b7

Please sign in to comment.