Remove unused Emitter import and mut inserted warning

This commit is contained in:
4aiman 2026-05-30 16:32:26 +03:00
commit 81125c03fa

View file

@ -2,7 +2,6 @@
use tauri_plugin_sql::{Migration, MigrationKind};
#[allow(unused_imports)]
use tauri::Manager;
use tauri::Emitter;
use serde::Serialize;
#[derive(Serialize)]
@ -153,11 +152,9 @@ fn import_seed_products(app: tauri::AppHandle) -> Result<String, String> {
let seed_str = seed_path.to_str().unwrap_or_default().to_string();
main_db.execute("ATTACH DATABASE ?1 AS seed", rusqlite::params![seed_str]).map_err(|e| e.to_string())?;
let mut inserted = 0usize;
// Bulk INSERT new products from seed (one SQL statement, not a loop)
main_db.execute("BEGIN", []).map_err(|e| e.to_string())?;
inserted = main_db.execute(
let inserted = main_db.execute(
"INSERT OR IGNORE INTO main.products (
name, brand, kcal_per_100g, protein_per_100g, fat_per_100g,
carbs_per_100g, fiber_per_100g, composition, source, store_id,