Mention the panicking behavior of block smoothing
This commit is contained in:
parent
3e8b2b3759
commit
8eafcebe62
1 changed files with 8 additions and 0 deletions
|
@ -141,6 +141,10 @@ impl Smoother<f32> {
|
||||||
/// allocate memory for the block smoothing.
|
/// allocate memory for the block smoothing.
|
||||||
///
|
///
|
||||||
/// Returns a `None` value if the block length exceed's the allocated capacity.
|
/// Returns a `None` value if the block length exceed's the allocated capacity.
|
||||||
|
///
|
||||||
|
/// # Panics
|
||||||
|
///
|
||||||
|
/// Panics if this function is called again while another block value slice is still alive.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn next_block(&self, block: &Block) -> Option<AtomicRefMut<[f32]>> {
|
pub fn next_block(&self, block: &Block) -> Option<AtomicRefMut<[f32]>> {
|
||||||
let mut block_values = self.block_values.borrow_mut();
|
let mut block_values = self.block_values.borrow_mut();
|
||||||
|
@ -238,6 +242,10 @@ impl Smoother<i32> {
|
||||||
/// allocate memory for the block smoothing.
|
/// allocate memory for the block smoothing.
|
||||||
///
|
///
|
||||||
/// Returns a `None` value if the block length exceed's the allocated capacity.
|
/// Returns a `None` value if the block length exceed's the allocated capacity.
|
||||||
|
///
|
||||||
|
/// # Panics
|
||||||
|
///
|
||||||
|
/// Panics if this function is called again while another block value slice is still alive.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn next_block(&self, block: &Block) -> Option<AtomicRefMut<[i32]>> {
|
pub fn next_block(&self, block: &Block) -> Option<AtomicRefMut<[i32]>> {
|
||||||
let mut block_values = self.block_values.borrow_mut();
|
let mut block_values = self.block_values.borrow_mut();
|
||||||
|
|
Loading…
Add table
Reference in a new issue