Remove layout::Cursor from the legalizer::split API.

We still use the cursor internally, but don't require callers to use it
too.
This commit is contained in:
Jakob Stoklund Olesen
2017-09-21 13:06:28 -07:00
parent 1cd91b6f30
commit 8e93aa7ce7
4 changed files with 39 additions and 26 deletions

View File

@@ -709,6 +709,15 @@ pub trait CursorBase {
/// Borrow a mutable reference to the function layout that this cursor is navigating.
fn layout_mut(&mut self) -> &mut Layout;
/// Rebuild this cursor positioned at `pos`.
fn at_position(mut self, pos: CursorPosition) -> Self
where
Self: Sized,
{
self.set_position(pos);
self
}
/// Rebuild this cursor positioned at `inst`.
///
/// This is intended to be used as a builder method: