diff --git a/.gitea/workflows/rust.yml b/.gitea/workflows/rust.yml index 3546989..b0481a3 100644 --- a/.gitea/workflows/rust.yml +++ b/.gitea/workflows/rust.yml @@ -3,14 +3,6 @@ on: [push, pull_request] name: Continuous integration jobs: - check: - name: Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - run: cargo check - build: name: build runs-on: ubuntu-latest diff --git a/editor/src/lib.rs b/editor/src/lib.rs index eeeade4..2025492 100644 --- a/editor/src/lib.rs +++ b/editor/src/lib.rs @@ -1,6 +1,6 @@ +use egui::Color32; use egui::TextBuffer; use egui::widgets::text_edit::TextEditOutput; -use egui::{Color32, text::LayoutJob}; use std::hash::{Hash, Hasher}; @@ -123,7 +123,7 @@ impl CodeEditor { } } - pub fn format(&self, string: &str) -> egui::text::TextFormat { + pub fn format(&self, _string: &str) -> egui::text::TextFormat { let font_id = egui::FontId::monospace(self.fontsize); let color = Color32::WHITE; egui::text::TextFormat::simple(font_id, color) diff --git a/src/editors/content_editor.rs b/src/editors/content_editor.rs index 3b853d0..4b1ba8f 100644 --- a/src/editors/content_editor.rs +++ b/src/editors/content_editor.rs @@ -1,4 +1,4 @@ -use egui::{TextEdit, text}; +use egui::TextEdit; use egui_commonmark::{CommonMarkCache, CommonMarkViewer}; use serde::{self, Deserialize, Serialize}; @@ -264,7 +264,7 @@ impl MainEditor { } fn editor_ui(&mut self, ui: &mut egui::Ui) { - let response = egui::ScrollArea::both() + let _response = egui::ScrollArea::both() .auto_shrink([false, false]) .id_salt("editor_scroll") .show(ui, |ui| { diff --git a/src/editors/context_editor.rs b/src/editors/context_editor.rs index 512307c..498a9e6 100644 --- a/src/editors/context_editor.rs +++ b/src/editors/context_editor.rs @@ -15,6 +15,7 @@ pub struct ProjectContext { } impl ProjectContext { + #[allow(dead_code)] pub fn new() -> Self { Self::default() } @@ -37,6 +38,7 @@ impl ProjectContext { std::fs::write(path, content).unwrap(); } + #[allow(dead_code)] pub fn ui(&mut self, ui: &mut egui::Ui) { // table egui::Grid::new("context_editor") diff --git a/src/editors/tags.rs b/src/editors/tags.rs index 5606e7a..0d86980 100644 --- a/src/editors/tags.rs +++ b/src/editors/tags.rs @@ -1,4 +1,4 @@ -use egui::{Response, RichText, TextEdit, UiBuilder}; +use egui::{Response, RichText, TextEdit}; use serde::{Deserialize, Serialize}; use crate::{PROJECT_FOLDER, util}; diff --git a/src/explorer.rs b/src/explorer.rs index 34eb8ef..de4c089 100644 --- a/src/explorer.rs +++ b/src/explorer.rs @@ -249,7 +249,7 @@ impl Explorer { }); }) .body(|ui| { - let mut entries: Vec<_> = WalkDir::new(PROJECT_FOLDER.join("assets")) + let entries: Vec<_> = WalkDir::new(PROJECT_FOLDER.join("assets")) .min_depth(1) .max_depth(1) // Only immediate children .sort_by(|a, b| { @@ -269,17 +269,12 @@ impl Explorer { .collect(); for entry in entries { - self.render_entry(ui, to_load, &entry); + Self::render_entry(ui, to_load, &entry); } }); } - fn render_entry( - &mut self, - ui: &mut egui::Ui, - to_load: &mut Option, - entry: &DirEntry, - ) { + fn render_entry(ui: &mut egui::Ui, to_load: &mut Option, entry: &DirEntry) { let file_type = entry.file_type(); let is_dir = file_type.is_dir(); let file_name = entry.file_name().to_string_lossy(); @@ -302,13 +297,13 @@ impl Explorer { .show_header(ui, |ui| { ui.horizontal(|ui| { ui.label(file_name); - let clicked = ui.button("+").on_hover_text("Add new item").clicked(); + let _clicked = ui.button("+").on_hover_text("Add new item").clicked(); }); }) .body(|ui| { // recursive call to render the next level of documents for entry in entries { - self.render_entry(ui, to_load, &entry); + Self::render_entry(ui, to_load, &entry); } }); } else { diff --git a/src/llm_integration/content_llm.rs b/src/llm_integration/content_llm.rs index 523c13c..136bbc5 100644 --- a/src/llm_integration/content_llm.rs +++ b/src/llm_integration/content_llm.rs @@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize}; pub fn continue_content( context: &str, instruction: &str, - max_tokens: usize, + _max_tokens: usize, ) -> Result> { let client = reqwest::blocking::Client::new();