From f8a95c802da367320417e3061e99d6030d97c629 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 23 Aug 2024 23:29:23 +0200 Subject: [PATCH] Switch from askama to rinja --- plotly/Cargo.toml | 6 +++--- plotly/src/lib.rs | 2 +- plotly/src/plot.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plotly/Cargo.toml b/plotly/Cargo.toml index 660c54d1..010c2981 100644 --- a/plotly/Cargo.toml +++ b/plotly/Cargo.toml @@ -18,11 +18,11 @@ kaleido = ["plotly_kaleido"] plotly_ndarray = ["ndarray"] plotly_image = ["image"] wasm = ["getrandom", "js-sys", "wasm-bindgen", "wasm-bindgen-futures"] -with-axum = ["askama/with-axum", "askama_axum"] +with-axum = ["rinja/with-axum", "rinja_axum"] [dependencies] -askama = { version = ">=0.11.0, <0.13.0", features = ["serde-json"] } -askama_axum = { version = "0.4.0", optional = true } +rinja = { version = "0.3", features = ["serde_json"] } +rinja_axum = { version = "0.3.0", optional = true } dyn-clone = "1" erased-serde = "0.4" getrandom = { version = "0.2", features = ["js"], optional = true } diff --git a/plotly/src/lib.rs b/plotly/src/lib.rs index c5337680..dbd18add 100644 --- a/plotly/src/lib.rs +++ b/plotly/src/lib.rs @@ -2,8 +2,8 @@ //! //! A plotting library for Rust powered by [Plotly.js](https://plot.ly/javascript/). #![recursion_limit = "256"] // lets us use a large serde_json::json! macro for testing crate::layout::Axis -extern crate askama; extern crate rand; +extern crate rinja; extern crate serde; #[cfg(all(feature = "kaleido", feature = "wasm"))] diff --git a/plotly/src/plot.rs b/plotly/src/plot.rs index 763adef4..cf27f9c8 100644 --- a/plotly/src/plot.rs +++ b/plotly/src/plot.rs @@ -1,12 +1,12 @@ use std::{fs::File, io::Write, path::Path}; -use askama::Template; use dyn_clone::DynClone; use erased_serde::Serialize as ErasedSerialize; use rand::{ distributions::{Alphanumeric, DistString}, thread_rng, }; +use rinja::Template; use serde::Serialize; use crate::{Configuration, Layout};