Expose index the TapeError occured on

Signed-off-by: trivernis <trivernis@protonmail.com>
master
trivernis 4 years ago
parent 0c003fe278
commit e58a34820e
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

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

@ -10,6 +10,11 @@ impl TapeError {
pub fn new(index: usize) -> Self { pub fn new(index: usize) -> Self {
Self { index } Self { index }
} }
/// Returns the index the error occured on
pub fn get_index(&self) -> usize {
self.index
}
} }
impl Display for TapeError { impl Display for TapeError {

Loading…
Cancel
Save