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:
17157
frontend/package-lock.json
generated
Normal file
17157
frontend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,4 @@
|
|||||||
use eframe::egui;
|
use eframe::egui;
|
||||||
use std::sync::Arc;
|
|
||||||
|
|
||||||
mod node_editor;
|
mod node_editor;
|
||||||
mod node_panel;
|
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 {
|
let native_options = eframe::NativeOptions {
|
||||||
viewport: egui::ViewportBuilder::default()
|
viewport: egui::ViewportBuilder::default()
|
||||||
.with_title("ComfyUI Rust Frontend")
|
.with_title("ComfyUI Rust Frontend")
|
||||||
|
|||||||
@@ -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");
|
ui.heading("Node Editor");
|
||||||
|
|
||||||
// Create a scroll area for the node editor
|
// Create a scroll area for the node editor
|
||||||
|
|||||||
@@ -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.set_min_width(300.0);
|
||||||
ui.heading("Preview Pane");
|
ui.heading("Preview Pane");
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ impl PreviewPane {
|
|||||||
// Display current preview info
|
// Display current preview info
|
||||||
ui.label(format!("Image: {}", self.image_name));
|
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)
|
// Try to display the image (simplified)
|
||||||
ui.label("Image would be displayed here");
|
ui.label("Image would be displayed here");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user