From 3151ef862596bbfc69b2941765f2574348d85a8f Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Sun, 4 Dec 2016 11:13:24 -0800 Subject: Rename RenderApi::render_grid() to render_cells() This probably should have been renamed in the original refactor, but oh well. `render_cells()` takes a generic parameter `I` which is any `Iterator` and is thus no longer coupled to the grid type. Renaming it reflects that. --- src/main.rs | 2 +- src/renderer/mod.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index aaa20953..04b269e3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -364,7 +364,7 @@ impl Display { api.clear(); // Draw the grid - api.render_grid(terminal.renderable_cells(), glyph_cache); + api.render_cells(terminal.renderable_cells(), glyph_cache); }); } diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index 2868a226..5f3fbfc7 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -685,7 +685,7 @@ impl<'a> RenderApi<'a> { }) .collect::>(); - self.render_grid(cells.into_iter(), glyph_cache); + self.render_cells(cells.into_iter(), glyph_cache); } #[inline] @@ -705,14 +705,14 @@ impl<'a> RenderApi<'a> { } } - pub fn render_grid( + pub fn render_cells( &mut self, - occupied_cells: I, + cells: I, glyph_cache: &mut GlyphCache ) where I: Iterator { - for cell in occupied_cells { + for cell in cells { // Get font key for cell // FIXME this is super inefficient. let mut font_key = glyph_cache.font_key; -- cgit