Closed jedahan closed 2 years ago
That's a good question... looking over the code I don't think there is a good reason. It seems moving them would be better. BTW I haven't forgotten about #4 just been very busy prepping a project for linux.conf.au next week.
Hi again!
Is there a reason GraphicsDisplay::new takes a reference to
black_buffer
andcolor_buffer
as opposed to taking ownership?I am trying to write a struct that wraps
GraphicsDisplay::new
, and in myLCD::new
create the buffers, but having a hard time with the compiler (rightfully) complaining that my buffers are going to be dropped at the end of the function, sinceGraphicsDisplay::new
is only borrowing them.