feat(rust-frontend): remove unused api_client parameter and update result type

- Updated main function return type from eframe::Result to eframe::Result<()>
- Removed unused std::sync::Arc import in main.rs
- Marked unused api_client parameters as _api_client in node_editor.rs and preview_pane.rs
- Added underscore prefix to unused image_data variable in preview_pane.rs
- Improves code clarity by removing unused dependencies and parameters
This commit is contained in:
2026-03-03 08:30:05 +01:00
parent cd7a54f38b
commit 14137101f3
4 changed files with 17161 additions and 5 deletions

17157
frontend/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,4 @@
use eframe::egui;
use std::sync::Arc;
mod node_editor;
mod node_panel;
@@ -53,7 +52,7 @@ impl eframe::App for ComfyUIApp {
}
}
fn main() -> eframe::Result {
fn main() -> eframe::Result<()> {
let native_options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default()
.with_title("ComfyUI Rust Frontend")

View File

@@ -36,7 +36,7 @@ impl NodeEditor {
}
}
pub fn ui(&mut self, ui: &mut egui::Ui, api_client: &ApiClient) {
pub fn ui(&mut self, ui: &mut egui::Ui, _api_client: &ApiClient) {
ui.heading("Node Editor");
// Create a scroll area for the node editor

View File

@@ -14,7 +14,7 @@ impl PreviewPane {
}
}
pub fn ui(&mut self, ui: &mut egui::Ui, api_client: &ApiClient) {
pub fn ui(&mut self, ui: &mut egui::Ui, _api_client: &ApiClient) {
ui.set_min_width(300.0);
ui.heading("Preview Pane");
@@ -23,7 +23,7 @@ impl PreviewPane {
// Display current preview info
ui.label(format!("Image: {}", self.image_name));
if let Some(data) = &self.image_data {
if let Some(_data) = &self.image_data {
// Try to display the image (simplified)
ui.label("Image would be displayed here");