mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-07-28 14:26:59 -07:00
fix: CI issues under Darwin
This commit is contained in:
committed by
Paul Spooren
parent
df3d1821c8
commit
2d20ad6335
+6
-3
@@ -1,5 +1,4 @@
|
|||||||
use anyhow::Error;
|
use anyhow::Error;
|
||||||
use futures::lock::Mutex;
|
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
use std::ops::DerefMut;
|
use std::ops::DerefMut;
|
||||||
@@ -140,11 +139,15 @@ mod netlink {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct CleanupHandlers(Arc<Mutex<Vec<Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>>>>);
|
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
|
||||||
|
struct CleanupHandlers(
|
||||||
|
Arc<::futures::lock::Mutex<Vec<Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>>>>,
|
||||||
|
);
|
||||||
|
|
||||||
|
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
|
||||||
impl CleanupHandlers {
|
impl CleanupHandlers {
|
||||||
fn new() -> Self {
|
fn new() -> Self {
|
||||||
CleanupHandlers(Arc::new(Mutex::new(vec![])))
|
CleanupHandlers(Arc::new(::futures::lock::Mutex::new(vec![])))
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn enqueue(&self, handler: Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>) {
|
async fn enqueue(&self, handler: Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>) {
|
||||||
|
|||||||
Reference in New Issue
Block a user