Expose assert_error function

master
trivernis 4 years ago
parent 9711e9e9e0
commit 485d59dd2d

@ -1,6 +1,6 @@
[package] [package]
name = "charred" name = "charred"
version = "0.1.3" version = "0.1.4"
authors = ["trivernis <trivernis@protonmail.com>"] authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018" edition = "2018"
license-file = "LICENSE" license-file = "LICENSE"

@ -173,7 +173,7 @@ impl CharTapeMachine {
/// returns an error on the current position and optionally rewinds /// returns an error on the current position and optionally rewinds
/// if a rewind index is given /// if a rewind index is given
#[inline] #[inline]
fn assert_error(&mut self, rewind_index: Option<usize>) -> TapeError { pub fn assert_error(&mut self, rewind_index: Option<usize>) -> TapeError {
if let Some(index) = rewind_index { if let Some(index) = rewind_index {
self.rewind_with_error(index) self.rewind_with_error(index)
} else { } else {

Loading…
Cancel
Save