diff --git a/src/channel.rs b/src/channel.rs index 60fc9a46847664f443cba40157d18a352352f59c..ed68aa3e578251035a0b28ac44c902bbdba3e186 100644 --- a/src/channel.rs +++ b/src/channel.rs @@ -124,7 +124,7 @@ impl Channels { fn remove(&mut self, num: u32) -> Result<()> { // TODO any checks? *self.ch.get_mut(num as usize).ok_or(Error::BadChannel)? = None; - Err(Error::otherbug()) + todo!(); // Ok(()) } diff --git a/src/error.rs b/src/error.rs index 450b14623647de317e81cee2ae4f264ccb1a229f..18431ba76d505e89191f9f66f488b4d5c1c51f1d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -95,9 +95,6 @@ pub enum Error { // Bug { location: snafu::Location }, /// Program bug Bug, - - // TODO remove this - OtherBug { location: snafu::Location }, } impl Error { @@ -126,24 +123,6 @@ impl Error { } } - pub fn otherbug() -> Error { - // Easier to track the source of errors in development, - // but release builds shouldn't panic. - if cfg!(debug_assertions) { - panic!("Hit a bug"); - } else { - let caller = core::panic::Location::caller(); - Error::OtherBug - { - location: snafu::Location::new( - caller.file(), - caller.line(), - caller.column(), - ), - } - } - } - /// Like [`bug()`] but with a message /// The message can be used instead of a code comment, is logged at `debug` level. #[cold]