You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parameter of the add_template function is a string reference with a lifetime. Why not use String to move the value here? Dealing with lifetime is not pleasant by any means.
For rust, the exact type of a function parameter depends on whether it needs to own it. It's not a good idea to just get a reference where then function need own it.
The text was updated successfully, but these errors were encountered:
The short answer is that not having that lifetime there makes the system self referential. Long answer is that this is a rather hard problem to solve and to support the source feature two external dependencies are used: self_cell and memo-map. Since not everybody needs this, I opted to making it optional. The API also surprisingly hard to resolve properly, given how some of the internals work. There is a ticket open to improve this #135 but all my attempts to address this have made the internals incredibly messy.
The parameter of the add_template function is a string reference with a lifetime. Why not use String to move the value here? Dealing with lifetime is not pleasant by any means.
For rust, the exact type of a function parameter depends on whether it needs to own it. It's not a good idea to just get a reference where then function need own it.
The text was updated successfully, but these errors were encountered: