Skip to content

Commit

Permalink
Fix Debug failing to compile on release mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Apr 25, 2019
1 parent 26873ea commit 6dc1d83
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/debug/null.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ use crate::graphics;

// Null debug implementation
#[cfg(not(debug_assertions))]
#[allow(missing_debug_implementations)]
#[allow(missing_docs)]
pub struct Debug {}

#[cfg(not(debug_assertions))]
impl Debug {
pub fn new(_gpu: &mut graphics::Gpu, _draw_rate: u16) -> Self {
pub(crate) fn new(_gpu: &mut graphics::Gpu, _draw_rate: u16) -> Self {
Self {}
}

Expand All @@ -17,9 +19,9 @@ impl Debug {
pub(crate) fn frame_started(&mut self) {}
pub(crate) fn frame_finished(&mut self) {}

pub(crate) fn event_loop_started(&mut self) {}
pub(crate) fn interact_started(&mut self) {}

pub(crate) fn event_loop_finished(&mut self) {}
pub(crate) fn interact_finished(&mut self) {}

pub(crate) fn update_started(&mut self) {}

Expand All @@ -35,5 +37,6 @@ impl Debug {
false
}

#[allow(missing_docs)]
pub fn draw(&mut self, _frame: &mut graphics::Frame) {}
}

0 comments on commit 6dc1d83

Please sign in to comment.