✅ (htmx): Uso de Context::default() por ::new(None)
This commit is contained in:
parent
c91b1cd35c
commit
1a3a295f18
2 changed files with 2 additions and 2 deletions
|
|
@ -4,7 +4,7 @@ use pagetop_htmx::prelude::*;
|
||||||
// Forces an effective language different from the default negotiated one (en-US, with no `?lang` in
|
// Forces an effective language different from the default negotiated one (en-US, with no `?lang` in
|
||||||
// the request), so that `Context::route()` decides to propagate `?lang=...` in local routes.
|
// the request), so that `Context::route()` decides to propagate `?lang=...` in local routes.
|
||||||
fn cx_with_lang(lang: &str) -> Context {
|
fn cx_with_lang(lang: &str) -> Context {
|
||||||
Context::new(None).with_langid(&Locale::resolve(lang))
|
Context::default().with_langid(&Locale::resolve(lang))
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn render_column(column: table::Column) -> String {
|
async fn render_column(column: table::Column) -> String {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use pagetop_htmx::prelude::*;
|
||||||
// Forces an effective language different from the default negotiated one (en-US, with no `?lang` in
|
// Forces an effective language different from the default negotiated one (en-US, with no `?lang` in
|
||||||
// the request), so that `Context::route()` decides to propagate `?lang=...` in local routes.
|
// the request), so that `Context::route()` decides to propagate `?lang=...` in local routes.
|
||||||
fn cx_with_lang(lang: &str) -> Context {
|
fn cx_with_lang(lang: &str) -> Context {
|
||||||
Context::new(None).with_langid(&Locale::resolve(lang))
|
Context::default().with_langid(&Locale::resolve(lang))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn header<'a>(response: &'a web::Response, name: &str) -> Option<&'a str> {
|
fn header<'a>(response: &'a web::Response, name: &str) -> Option<&'a str> {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue