fix: Compiler lints
Gitea Scan/plate-tool/pipeline/head This commit looks good Details

This commit is contained in:
Emilia Allison 2024-08-11 11:55:46 -04:00
parent 9aad876a31
commit 83d74cfc6f
Signed by: emilia
GPG Key ID: 7A3F8997BFE894E0
5 changed files with 4 additions and 7 deletions

View File

@ -9,8 +9,6 @@ use crate::components::states::MainState;
use super::create_close_button;
type NoParamsCallback = Box<dyn Fn(())>;
pub fn input_json_input_callback(
main_dispatch: Dispatch<MainState>,
modal: HtmlDialogElement,

View File

@ -13,8 +13,6 @@ use crate::components::states::{CsvExportType, MainState};
use super::create_close_button;
type NoParamsCallback = Box<dyn Fn(())>;
pub fn toggle_in_transfer_hashes_callback(
main_dispatch: Dispatch<MainState>,
) -> Callback<web_sys::MouseEvent> {

View File

@ -4,8 +4,6 @@ use wasm_bindgen::{prelude::*, JsCast};
use web_sys::HtmlElement;
use yew::prelude::*;
type NoParamsCallback = Box<dyn Fn(())>;
pub fn create_close_button(close: &Closure<dyn FnMut(Event)>) -> HtmlElement {
let document = web_sys::window().unwrap().document().unwrap();
let close_button = document

View File

@ -17,7 +17,9 @@ pub struct NewPlateDialogProps {
pub enum NewPlateDialogType {
SourceOnly,
DestinationOnly,
Both,
#[allow(dead_code)]
Both, // Retained old functionality
}
#[function_component]

View File

@ -26,6 +26,7 @@ impl ColorPalette {
]
}
#[allow(dead_code)] // Preserve old implementation for reference
fn get_u8(&self, t: u8) -> [f64; 3] {
assert!(t > 0, "t must be greater than zero!");
self.get((2f64.powi(-(t.ilog2() as i32))) * (t as f64 + 0.5f64) - 1.0f64)