Update dependencies #172

Merged
lucas merged 3 commits from feat/updates into master 2024-05-15 15:30:13 +02:00
6 changed files with 3 additions and 20 deletions
Showing only changes of commit cfee6d9121 - Show all commits

View file

@ -9,6 +9,7 @@ members = [
"lib/serde_sjson", "lib/serde_sjson",
"lib/luajit2-sys", "lib/luajit2-sys",
] ]
exclude = ["lib/color-eyre"]
[patch.crates-io] [patch.crates-io]
color-eyre = { path = "lib/color-eyre" } color-eyre = { path = "lib/color-eyre" }

View file

@ -1,6 +1,5 @@
#![recursion_limit = "256"] #![recursion_limit = "256"]
#![feature(let_chains)] #![feature(let_chains)]
#![feature(arc_unwrap_or_clone)]
#![feature(iterator_try_collect)] #![feature(iterator_try_collect)]
#![windows_subsystem = "windows"] #![windows_subsystem = "windows"]

View file

@ -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)>`, /// 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 /// where each element in the destination vector includes its index in the
/// source vector. /// source vector.
#[allow(dead_code)]
pub(crate) struct IndexedVectorLens; pub(crate) struct IndexedVectorLens;
impl<T: Data> Lens<Vector<T>, Vector<(usize, T)>> for IndexedVectorLens { impl<T: Data> Lens<Vector<T>, Vector<(usize, T)>> for IndexedVectorLens {

View file

@ -69,23 +69,10 @@ pub mod gruvbox_dark {
} }
pub trait ColorExt { pub trait ColorExt {
fn lighten(&self, fac: f32) -> Self;
fn darken(&self, fac: f32) -> Self; fn darken(&self, fac: f32) -> Self;
} }
impl ColorExt for Color { 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 { fn darken(&self, fac: f32) -> Self {
let (r, g, b, a) = self.as_rgba(); let (r, g, b, a) = self.as_rgba();
let rgb = Rgb::from(r as f32, g as f32, b as f32); let rgb = Rgb::from(r as f32, g as f32, b as f32);

View file

@ -2,16 +2,11 @@ use std::path::PathBuf;
use std::sync::Arc; use std::sync::Arc;
use druid::text::Formatter; use druid::text::Formatter;
use druid::{Data, Widget};
pub mod border; pub mod border;
pub mod button; pub mod button;
pub mod controller; 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; pub(crate) struct PathBufFormatter;
impl PathBufFormatter { impl PathBufFormatter {

@ -1 +1 @@
Subproject commit 8a3d4544046f956e8e28c906553dc54d325368c1 Subproject commit b40962a61c748756d7da293d9fff26aca019603e