mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
fix: nightly warning in server macro for lifetime (#1580)
On the latest lifetime we're getting the following warning in the server macro: warning: `&` without an explicit lifetime name cannot be used here --> src/login.rs:19:1 | 19 | #[server(Login, "/api")] | ^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #115010 <https://github.com/rust-lang/rust/issues/115010> = note: this warning originates in the attribute macro `server` (in Nightly builds, run with -Z macro-backtrace for more info)
This commit is contained in:
parent
ec4bd7600f
commit
533fccd1d3
1 changed files with 2 additions and 2 deletions
|
@ -281,7 +281,7 @@ pub fn server_macro_impl(
|
|||
}
|
||||
|
||||
impl #struct_name {
|
||||
const URL: &str = if #fn_path.is_empty() {
|
||||
const URL: &'static str = if #fn_path.is_empty() {
|
||||
#server_fn_path::const_format::concatcp!(
|
||||
#fn_name_as_str,
|
||||
#server_fn_path::xxhash_rust::const_xxh64::xxh64(
|
||||
|
@ -292,7 +292,7 @@ pub fn server_macro_impl(
|
|||
} else {
|
||||
#fn_path
|
||||
};
|
||||
const PREFIX: &str = #prefix;
|
||||
const PREFIX: &'static str = #prefix;
|
||||
const ENCODING: #server_fn_path::Encoding = #encoding;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue