mirror of
https://github.com/actix/examples
synced 2025-06-26 09:17:41 +02:00
chore: edition 2024
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "templating-askama"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
actix-web.workspace = true
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "templating-fluent"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
actix-web.workspace = true
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "templating-handlebars"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
actix-web.workspace = true
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "templating-minijinja"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
actix-web.workspace = true
|
||||
|
@ -1,12 +1,13 @@
|
||||
use std::{collections::HashMap, env, path::PathBuf};
|
||||
|
||||
use actix_utils::future::{ready, Ready};
|
||||
use actix_utils::future::{Ready, ready};
|
||||
use actix_web::{
|
||||
App, FromRequest, HttpRequest, HttpResponse, HttpServer, Responder, Result,
|
||||
dev::{self, ServiceResponse},
|
||||
error,
|
||||
http::{header::ContentType, StatusCode},
|
||||
http::{StatusCode, header::ContentType},
|
||||
middleware::{ErrorHandlerResponse, ErrorHandlers, Logger},
|
||||
web, App, FromRequest, HttpRequest, HttpResponse, HttpServer, Responder, Result,
|
||||
web,
|
||||
};
|
||||
use minijinja::path_loader;
|
||||
use minijinja_autoreload::AutoReloader;
|
||||
@ -16,11 +17,11 @@ struct MiniJinjaRenderer {
|
||||
}
|
||||
|
||||
impl MiniJinjaRenderer {
|
||||
fn render(
|
||||
fn render<T: Into<minijinja::value::Value>>(
|
||||
&self,
|
||||
tmpl: &str,
|
||||
ctx: impl Into<minijinja::value::Value>,
|
||||
) -> actix_web::Result<impl Responder> {
|
||||
ctx: T,
|
||||
) -> actix_web::Result<impl Responder + use<T>> {
|
||||
self.tmpl_env
|
||||
.acquire_env()
|
||||
.map_err(|_| error::ErrorInternalServerError("could not acquire template env"))?
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "templating-sailfish"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
actix-web.workspace = true
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "templating-tera"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
actix-web.workspace = true
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "templating-tinytemplate"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
actix-web.workspace = true
|
||||
|
@ -1,8 +1,8 @@
|
||||
[package]
|
||||
name = "templating-yarte"
|
||||
version = "1.0.0"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
publish = false
|
||||
edition = "2021"
|
||||
|
||||
[package.metadata.cargo-machete]
|
||||
ignored = [
|
||||
|
Reference in New Issue
Block a user