define_histogram: Fix potential issue

This commit is contained in:
Vinzent Steinberg 2018-07-24 18:58:17 +02:00
parent 5807e211dc
commit ee110a774f

View File

@ -140,7 +140,7 @@ macro_rules! define_histogram {
/// Return the ranges of the histogram.
#[inline]
pub fn ranges(&self) -> &[f64] {
&self.range as &[f64]
&self.range[..]
}
/// Return an iterator over the bins and corresponding ranges:
@ -207,7 +207,7 @@ macro_rules! define_histogram {
impl $crate::Histogram for Histogram {
#[inline]
fn bins(&self) -> &[u64] {
&self.bin as &[u64]
&self.bin[..]
}
}