Fix Windows build: value clone in settings, mutable img in OCR
This commit is contained in:
parent
fce171808e
commit
c017f2fb2e
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue