From 9a95fa323c73c32238d30923cfc9160a795066e7 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sat, 1 Jun 2024 07:36:48 +0200 Subject: [PATCH] Adjustment. --- examples/grid.rs | 6 ++++-- src/lib.rs | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/grid.rs b/examples/grid.rs index 782166d..2d11cbf 100644 --- a/examples/grid.rs +++ b/examples/grid.rs @@ -1,5 +1,7 @@ extern crate zakgrid; +use std::any::Any; + use config::{Config, ConfigError}; use serde_derive::Deserialize; @@ -43,7 +45,7 @@ struct AppState { settings: Settings, } -fn get_not_exists(value: &serde_json::Value) -> String { +fn get_not_exists(value: &serde_json::Value, user_data: &Option>) -> String { String::from("not exists (returned by fn)") } @@ -83,7 +85,7 @@ async fn index( grid.add_column(col); let mut col = zakgrid::Column::new("not_exists"); - col.set_to_call(Some(get_not_exists)); + col.set_to_call(Some(get_not_exists), None); grid.add_column(col); let cols = grid.columns(); diff --git a/src/lib.rs b/src/lib.rs index 6019b29..df3c191 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,5 @@ use std::any::Any; -use serde_json::Value; use serde_derive::Serialize; use tera::Tera; -- 2.49.0