pub fn shl(&mut self, count:usize){
        self.s_buf.rotate_left(count);

        if let Some(ptr) = self.d_buf{
            for i in 0..count{
                self.s_buf[N - count + i] = unsafe {(*ptr.offset(i as isize)).clone()}; // copies stuff
            }
            for i in 0..(self.capacity - N){
                if i + count < self.capacity - N{
                    unsafe { *ptr.offset(i as isize) = (*ptr.offset((i + count) as isize)).clone()}; // shifts left
                }
            }
            for i in 0..count{
                unsafe { (*ptr.offset((self.capacity - N - count + i) as isize)) = self.default.clone()}; // sets upper bits to zero
            }
        } else {
            for i in 0..count{
                self.s_buf[N-count+i] = self.default.clone(); // sets upper bits to default values
            }
        }
    }
/// Shift Elements Left
///
/// - BUG: Do not shift more than the size of the stack, any more would cause a panic. If a shift of more than the size of the stack is required,
/// call this function multiple times.
Shift Elements Left
BUG: Do not shift more than the size of the stack, any more would cause a panic. If a shift of more than the size of the stack is required,
call this function multiple times.
Shift Elements Left BUG : Do not shift more than the size of the stack any more would cause a panic . If a shift of more than the size of the stack is required call this function multiple times .
pub fn shl(&mut self, count:usize){
        self.s_buf.rotate_left(count);
        if let Some(ptr) = self.d_buf{
            for i in 0..count{
                self.s_buf[N - count + i] = unsafe {(*ptr.offset(i as isize)).clone()}; // copies stuff
            }
            for i in 0..(self.capacity - N){
                if i + count < self.capacity - N{
                    unsafe { *ptr.offset(i as isize) = (*ptr.offset((i + count) as isize)).clone()}; // shifts left
                }
            }
            for i in 0..count{
                unsafe { (*ptr.offset((self.capacity - N - count + i) as isize)) = self.default.clone()}; // sets upper bits to zero
            }
        } else {
            for i in 0..count{
                self.s_buf[N-count+i] = self.default.clone(); // sets upper bits to default values
            }
        }
    }
pub fn shl ( & mut self , count : usize ) { self . s_buf . rotate_left ( count ) ; if let Some ( ptr ) = self . d_buf { for i in 0 .. count { self . s_buf [ N - count + i ] = unsafe { ( * ptr . offset ( i as isize ) ) . clone ( ) } ; // copies stuff } for i in 0 .. ( self . capacity - N ) { if i + count < self . capacity - N { unsafe { * ptr . offset ( i as isize ) = ( * ptr . offset ( ( i + count ) as isize ) ) . clone ( ) } ; // shifts left } } for i in 0 .. count { unsafe { ( * ptr . offset ( ( self . capacity - N - count + i ) as isize ) ) = self . default . clone ( ) } ; // sets upper bits to zero } } else { for i in 0 .. count { self . s_buf [ N - count + i ] = self . default . clone ( ) ; // sets upper bits to default values } } }
Shift Elements Left
 BUG: Do not shift more than the size of the stack, any more would cause a panic.
Shift Elements Left BUG : Do not shift more than the size of the stack any more would cause a panic .
&mut self
count
usize
&mut self
count
usize