Skip to content

Commit 0bc4f8a

Browse files
committed
Fix capture rules
1 parent 80d5a06 commit 0bc4f8a

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

editor/src/messages/portfolio/document/overlays/grid_overlays.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,16 @@ pub fn grid_overlay(document: &DocumentMessageHandler, overlay_context: &mut Ove
211211

212212
pub fn overlay_options(grid: &GridSnapping) -> Vec<LayoutGroup> {
213213
let mut widgets = Vec::new();
214-
fn update_val<I>(grid: &GridSnapping, update: impl Fn(&mut GridSnapping, &I)) -> impl Fn(&I) -> Message {
215-
let grid = grid.clone();
214+
fn update_val<I, F: Fn(&mut GridSnapping, &I)>(grid: &GridSnapping, update: F) -> impl Fn(&I) -> Message + use<I, F> {
215+
let new_grid = grid.clone();
216216
move |input: &I| {
217-
let mut grid = grid.clone();
217+
let mut grid = new_grid.clone();
218218
update(&mut grid, input);
219219
DocumentMessage::GridOptions(grid).into()
220220
}
221221
}
222222
let update_origin = |grid, update: fn(&mut GridSnapping) -> Option<&mut f64>| {
223-
update_val::<NumberInput>(grid, move |grid, val| {
223+
update_val::<NumberInput, _>(grid, move |grid, val| {
224224
if let Some(val) = val.value {
225225
if let Some(update) = update(grid) {
226226
*update = val;
@@ -229,7 +229,7 @@ pub fn overlay_options(grid: &GridSnapping) -> Vec<LayoutGroup> {
229229
})
230230
};
231231
let update_color = |grid, update: fn(&mut GridSnapping) -> Option<&mut Color>| {
232-
update_val::<ColorInput>(grid, move |grid, color| {
232+
update_val::<ColorInput, _>(grid, move |grid, color| {
233233
if let FillChoice::Solid(color) = color.value {
234234
if let Some(update_color) = update(grid) {
235235
*update_color = color;
@@ -238,7 +238,7 @@ pub fn overlay_options(grid: &GridSnapping) -> Vec<LayoutGroup> {
238238
})
239239
};
240240
let update_display = |grid, update: fn(&mut GridSnapping) -> Option<&mut bool>| {
241-
update_val::<CheckboxInput>(grid, move |grid, checkbox| {
241+
update_val::<CheckboxInput, _>(grid, move |grid, checkbox| {
242242
if let Some(update) = update(grid) {
243243
*update = checkbox.checked;
244244
}

frontend/src-tauri/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ authors = ["Graphite Authors <[email protected]>"]
66
license = "Apache-2.0"
77
repository = ""
88
default-run = "graphite-desktop"
9-
edition = "2024"
10-
rust-version = "1.85"
9+
edition = "2021"
10+
rust-version = "1.79"
1111

1212
[features]
1313
# by default Tauri runs in production mode

frontend/src-tauri/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use graphite_editor::messages::prelude::*;
77
// use axum::extract::Path;
88
// use axum::http;
99
// use axum::response::IntoResponse;
10-
use axum::Router;
1110
use axum::routing::get;
11+
use axum::Router;
1212
use fern::colors::{Color, ColoredLevelConfig};
1313
// use http::{Response, StatusCode};
1414
use std::cell::RefCell;

0 commit comments

Comments
 (0)