diff --git a/Cargo.toml b/Cargo.toml index bba781f..eea0eac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "charred" -version = "0.3.5" +version = "0.3.6" authors = ["trivernis "] edition = "2018" license-file = "LICENSE" diff --git a/src/tapemachine.rs b/src/tapemachine.rs index 4f4cf39..0868682 100644 --- a/src/tapemachine.rs +++ b/src/tapemachine.rs @@ -10,6 +10,11 @@ impl TapeError { pub fn new(index: usize) -> Self { Self { index } } + + /// Returns the index the error occured on + pub fn get_index(&self) -> usize { + self.index + } } impl Display for TapeError {