Allow unused variables in release mode
In release mode we have a few unused variable warnings, lets just allow them. Found when running bench code, interestingly `cargo bench` must build in release mode.
This commit is contained in:
parent
e2ff08635e
commit
eb67e873e0
|
@ -159,6 +159,7 @@ struct DisplayWrapper<'a, T: 'a + Encodable, E>(&'a T, PhantomData<E>);
|
|||
impl<'a, T: 'a + Encodable, E: ByteEncoder> fmt::Display for DisplayWrapper<'a, T, E> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let mut writer = IoWrapper::<'_, _, E::Encoder>::new(f, E::default().into());
|
||||
#[allow(unused_variables)] // When debug_assertions are not enabled.
|
||||
self.0.consensus_encode(&mut writer).map_err(|error| {
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
|
@ -199,6 +200,7 @@ impl<W: fmt::Write> ErrorTrackingWriter<W> {
|
|||
}
|
||||
|
||||
#[track_caller]
|
||||
#[allow(unused_variables)] // When debug_assertions are not enabled.
|
||||
fn assert_no_error(&self, fun: &str) {
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
|
@ -217,6 +219,7 @@ impl<W: fmt::Write> ErrorTrackingWriter<W> {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)] // When debug_assertions are not enabled.
|
||||
fn set_error(&mut self, was: bool) {
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue