Skip to content

Commit

Permalink
Switch from askama to rinja (#879)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez authored Sep 2, 2024
1 parent 297499a commit 550bca6
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 45 deletions.
209 changes: 168 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ maintenance = { status = "actively-developed" }

[dependencies]
anyhow = "1.0.32"
askama = { version = "0.12.0", default-features = false }
bincode = "1.3.1"
clap = { version = "4.3.0", features = ["derive"] }
color-print = "0.3.4"
Expand All @@ -26,6 +25,7 @@ dunce = "1.0.1"
fastrand = "2.0.0"
glob = "0.3.0"
ouroboros = "0.18.3"
rinja = { version = "0.3.2", default-features = false }
serde = { version = "1.0.116", features = ["derive"] }

[target.'cfg(unix)'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/init.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::io::{self, Write};

use anyhow::{Context, Result};
use askama::Template;
use rinja::Template;

use crate::cmd::{Init, InitShell, Run};
use crate::config;
Expand Down
4 changes: 2 additions & 2 deletions src/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub struct Opts<'a> {

macro_rules! make_template {
($name:ident, $path:expr) => {
#[derive(::std::fmt::Debug, ::askama::Template)]
#[derive(::std::fmt::Debug, ::rinja::Template)]
#[template(path = $path)]
pub struct $name<'a>(pub &'a self::Opts<'a>);

Expand All @@ -35,8 +35,8 @@ make_template!(Zsh, "zsh.txt");
#[cfg(feature = "nix-dev")]
#[cfg(test)]
mod tests {
use askama::Template;
use assert_cmd::Command;
use rinja::Template;
use rstest::rstest;
use rstest_reuse::{apply, template};

Expand Down

0 comments on commit 550bca6

Please sign in to comment.