So I have been following the 'Writing an OS in Rust' guide. And while I was experimenting and reading through the code I noticed that Copy hasn't been implemented for Volatile.
This could be useful when writing code:
impl<T:Copy>CopyforVolatile<T>{// Empty.}After this the new line function for the VGA buffer can be implemented as follows:
fnnew_line(&mutself){&self.buffer.chars.copy_within(1..,0);self.clear_row(BUFFER_HEIGHT - 1);self.column_position = 0;}Now I did notice that copy_within uses the normal ptr::copy instead of volatile_copy_memory. Is this a potential issue?
Anyway let me know if you want to add this, if so I will make a short MR.
So I have been following the 'Writing an OS in Rust' guide. And while I was experimenting and reading through the code I noticed that
Copyhasn't been implemented forVolatile.This could be useful when writing code:
After this the new line function for the VGA buffer can be implemented as follows:
Now I did notice that
copy_withinuses the normalptr::copyinstead of volatile_copy_memory. Is this a potential issue?Anyway let me know if you want to add this, if so I will make a short MR.