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
One of the initial decisions was to use String types in enums/structs, which has propogated now that there are many more passes and there are many places where to_string and such are called when they shouldn't need to be.
I played around for a bit and found that I should at least:
File type rename to "Context" which is the compilation context. This is the main struct which OWNS the content, file_name, etc Strings
Tokens refer to &'a str instead of String. &'a refers to slices in context. Basically saying the Token cannot live longer than from where the slice comes from (aka context.content) (NO context dies first, token still refers), which is TRUE
The text was updated successfully, but these errors were encountered:
https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.html
http://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/share/doc/rust/html/book/second-edition/ch19-02-advanced-lifetimes.html
One of the initial decisions was to use String types in enums/structs, which has propogated now that there are many more passes and there are many places where to_string and such are called when they shouldn't need to be.
I played around for a bit and found that I should at least:
The text was updated successfully, but these errors were encountered: