Fix Windows build: value clone in settings, mutable img in OCR

This commit is contained in:
Aether 2026-02-23 19:40:56 +00:00
parent fce171808e
commit c017f2fb2e
No known key found for this signature in database
GPG Key ID: 95AFEE837E39AFD2
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ impl OCREngine {
.ok_or_else(|| format!("Region '{}' not found", region_name))?; .ok_or_else(|| format!("Region '{}' not found", region_name))?;
// Load image // Load image
let img = image::load_from_memory(screenshot) let mut img = image::load_from_memory(screenshot)
.map_err(|e| format!("Failed to load image: {}", e))?; .map_err(|e| format!("Failed to load image: {}", e))?;
// Crop to region // Crop to region

View File

@ -114,7 +114,7 @@ impl SettingsManager {
for (i, k) in keys.iter().enumerate() { for (i, k) in keys.iter().enumerate() {
if i == keys.len() - 1 { if i == keys.len() - 1 {
current.insert(k.to_string(), value); current.insert(k.to_string(), value.clone());
} else { } else {
current = current current = current
.entry(k.to_string()) .entry(k.to_string())