Tauri: Fix build on Mac (#6829)

This commit is contained in:
zubiden 2026-04-14 14:35:57 +02:00 committed by Alexander Zinchuk
parent 2bf27f3f44
commit 54d5b79d26
3 changed files with 6 additions and 7 deletions

4
tauri/Cargo.lock generated
View File

@ -6252,9 +6252,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]]
name = "uuid"
version = "1.22.0"
version = "1.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37"
checksum = "5ac8b6f42ead25368cf5b098aeb3dc8a1a2c05a3eee8a9a1a68c640edbfc79d9"
dependencies = [
"getrandom 0.4.2",
"js-sys",

View File

@ -26,7 +26,7 @@ tauri-plugin-process = "2.3.1"
tauri-plugin-fs = "2.4.5"
tauri-plugin-deep-link = "2.4.7"
log = "0.4.29"
uuid = { version = "1.22.0", features = ["v4"] }
uuid = { version = "1.23.0", features = ["v4"] }
url = "2.5.8"
image = "0.25.10"
imageproc = "0.26.1"

View File

@ -84,8 +84,7 @@ pub fn setup_traffic_light_positioner<R: Runtime>(
use cocoa::delegate;
use cocoa::foundation::NSUInteger;
use objc::runtime::{Object, Sel};
use rand::Rng;
use rand::distr::Alphanumeric;
use rand::distr::{Alphanumeric, Distribution};
use std::ffi::c_void;
position_traffic_lights(
@ -325,8 +324,8 @@ pub fn setup_traffic_light_positioner<R: Runtime>(
traffic_position,
};
let app_box = Box::into_raw(Box::new(app_state)) as *mut c_void;
let random_str: String = rand::rng()
.sample_iter(&Alphanumeric)
let random_str: String = Alphanumeric
.sample_iter(rand::rng())
.take(20)
.map(char::from)
.collect();