mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-29 13:52:46 -07:00
refactor: handle macros code in tuono_lib crate
This commit is contained in:
@@ -8,11 +8,11 @@ use crate::Request;
|
||||
/// This is the data shared to the client
|
||||
pub struct Payload<'a> {
|
||||
router: Location<'a>,
|
||||
props: Box<dyn Serialize>,
|
||||
props: &'a dyn Serialize,
|
||||
}
|
||||
|
||||
impl<'a> Payload<'a> {
|
||||
pub fn new(req: &Request<'a>, props: Box<dyn Serialize>) -> Payload<'a> {
|
||||
pub fn new(req: &Request<'a>, props: &'a dyn Serialize) -> Payload<'a> {
|
||||
Payload {
|
||||
router: req.location(),
|
||||
props,
|
||||
|
||||
Reference in New Issue
Block a user