Fix clippy lints
This commit is contained in:
parent
4ad30a8a12
commit
cfee6d9121
6 changed files with 3 additions and 20 deletions
|
@ -9,6 +9,7 @@ members = [
|
|||
"lib/serde_sjson",
|
||||
"lib/luajit2-sys",
|
||||
]
|
||||
exclude = ["lib/color-eyre"]
|
||||
|
||||
[patch.crates-io]
|
||||
color-eyre = { path = "lib/color-eyre" }
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#![recursion_limit = "256"]
|
||||
#![feature(let_chains)]
|
||||
#![feature(arc_unwrap_or_clone)]
|
||||
#![feature(iterator_try_collect)]
|
||||
#![windows_subsystem = "windows"]
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ impl Lens<State, Option<Arc<ModInfo>>> for SelectedModLens {
|
|||
/// A Lens that maps an `im::Vector<T>` to `im::Vector<(usize, T)>`,
|
||||
/// where each element in the destination vector includes its index in the
|
||||
/// source vector.
|
||||
#[allow(dead_code)]
|
||||
pub(crate) struct IndexedVectorLens;
|
||||
|
||||
impl<T: Data> Lens<Vector<T>, Vector<(usize, T)>> for IndexedVectorLens {
|
||||
|
|
|
@ -69,23 +69,10 @@ pub mod gruvbox_dark {
|
|||
}
|
||||
|
||||
pub trait ColorExt {
|
||||
fn lighten(&self, fac: f32) -> Self;
|
||||
fn darken(&self, fac: f32) -> Self;
|
||||
}
|
||||
|
||||
impl ColorExt for Color {
|
||||
fn lighten(&self, fac: f32) -> Self {
|
||||
let (r, g, b, a) = self.as_rgba();
|
||||
let rgb = Rgb::from(r as f32, g as f32, b as f32);
|
||||
let rgb = rgb.lighten(fac);
|
||||
Self::rgba(
|
||||
rgb.get_red() as f64,
|
||||
rgb.get_green() as f64,
|
||||
rgb.get_blue() as f64,
|
||||
a,
|
||||
)
|
||||
}
|
||||
|
||||
fn darken(&self, fac: f32) -> Self {
|
||||
let (r, g, b, a) = self.as_rgba();
|
||||
let rgb = Rgb::from(r as f32, g as f32, b as f32);
|
||||
|
|
|
@ -2,16 +2,11 @@ use std::path::PathBuf;
|
|||
use std::sync::Arc;
|
||||
|
||||
use druid::text::Formatter;
|
||||
use druid::{Data, Widget};
|
||||
|
||||
pub mod border;
|
||||
pub mod button;
|
||||
pub mod controller;
|
||||
|
||||
pub trait ExtraWidgetExt<T: Data>: Widget<T> + Sized + 'static {}
|
||||
|
||||
impl<T: Data, W: Widget<T> + 'static> ExtraWidgetExt<T> for W {}
|
||||
|
||||
pub(crate) struct PathBufFormatter;
|
||||
|
||||
impl PathBufFormatter {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 8a3d4544046f956e8e28c906553dc54d325368c1
|
||||
Subproject commit b40962a61c748756d7da293d9fff26aca019603e
|
Loading…
Add table
Reference in a new issue