On Wednesday, October 9, 2024 at 8:36:57 AM UTC-5 Edward K. Ream wrote:

The updated readme file <https://github.com/edreamleo/ekr-tbo-in-rust> 
discusses the status of the tbo-in-rust project. The project is at a good 
stopping point, but I might press on a bit more.


I've resolved the last language-related question!

I wanted to define index_dict as *HashMap<usize, &'a str>* but the borrow 
checker complained that the *context *argument to *set_context* did not 
live long enough.

However, the context arg is always a slice, so I only needed to change the 
signature from:

     fn set_context(&mut self, i: usize, context: &str) { 
to:
    fn set_context(&mut self, i: usize, context: &'*static* str) {

So it looks like my study of Rust is complete for now.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/3eddcf72-c313-426a-8611-b6006bce56e2n%40googlegroups.com.

Reply via email to