Document the update detection mechanism of VersionedCanvas::update

This commit is contained in:
Francesco Magliocca 2020-11-09 21:07:37 +01:00
parent 114ea2309e
commit d0f40530ff
1 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,10 @@ impl VersionedCanvas {
}
}
// TODO: Right now the update function internally checks
// whether the canvas has been changed by leveraging the
// Copy on Write semantics of im::Vector.
// Is this a good solution? Does this work correctly? THINK ABOUT THIS
pub fn update(&mut self, update_fn: impl FnOnce(&mut Canvas)) {
// This is a linear history,
// so we first check if there are newer versions, if so