@ -1,6 +1,6 @@
[package]
name = "charred"
version = "0.2.1"
version = "0.2.2"
authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018"
license-file = "LICENSE"
@ -91,9 +91,11 @@ impl CharTapeMachine {
/// Rewinds to a given index
#[inline]
pub fn rewind(&mut self, index: usize) {
if self.text.len() > index {
self.index = index;
self.current_char = *self.text.get(index).unwrap();
}
/// Rewinds to a given index and returns an error