aboutsummaryrefslogtreecommitdiff
path: root/src/grid/storage.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/grid/storage.rs')
-rw-r--r--src/grid/storage.rs43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/grid/storage.rs b/src/grid/storage.rs
index 0f0f611b..d517fa01 100644
--- a/src/grid/storage.rs
+++ b/src/grid/storage.rs
@@ -172,25 +172,11 @@ impl<T> Storage<T> {
self.len
}
- #[inline]
- pub fn raw_len(&self) -> usize {
- self.inner.len()
- }
-
/// Compute actual index in underlying storage given the requested index.
fn compute_index(&self, requested: usize) -> usize {
(requested + self.zero) % self.inner.len()
}
- #[inline]
- pub fn line_offset(&self) -> usize {
- self.inner.len() + self.zero + *self.visible_lines
- }
-
- pub fn compute_line_index(&self, a: Line) -> usize {
- (self.line_offset() - *a) % self.inner.len()
- }
-
pub fn swap_lines(&mut self, a: Line, b: Line) {
let offset = self.inner.len() + self.zero + *self.visible_lines;
let a = (offset - *a) % self.inner.len();
@@ -234,13 +220,6 @@ impl<T> Storage<T> {
}
}
- /// Iterator over *logical* entries in the storage
- ///
- /// This *does not* iterate over hidden entries.
- pub fn iter_mut(&mut self) -> IterMut<T> {
- IterMut { storage: self, index: 0 }
- }
-
/// Iterate over *all* entries in the underlying buffer
///
/// This includes hidden entries.
@@ -300,28 +279,6 @@ impl<T> IndexMut<Line> for Storage<T> {
}
}
-pub struct IterMut<'a, T: 'a> {
- storage: &'a mut Storage<T>,
- index: usize,
-}
-
-impl<'a, T: 'a> Iterator for IterMut<'a, T> {
- type Item = &'a mut Row<T>;
-
- fn next(&mut self) -> Option<Self::Item> {
- if self.index == self.storage.len() {
- None
- } else {
- let index = self.index;
- self.index += 1;
-
- unsafe {
- Some(&mut *(&mut self.storage[index] as *mut _))
- }
- }
- }
-}
-
#[cfg(test)]
use index::Column;