File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -499,18 +499,30 @@ where
499499 /// `padding` from the right.
500500 #[ inline]
501501 #[ must_use = "method returns a new mask and does not mutate the original inputs" ]
502- pub fn shift_elements_left < const OFFSET : usize > ( self , padding : T ) -> Self {
502+ pub fn shift_elements_left < const OFFSET : usize > ( self , padding : bool ) -> Self {
503503 // Safety: swizzles are safe for masks
504- unsafe { Self :: from_int_unchecked ( self . to_int ( ) . shift_elements_left :: < OFFSET > ( padding) ) }
504+ unsafe {
505+ Self :: from_int_unchecked ( self . to_int ( ) . shift_elements_left :: < OFFSET > ( if padding {
506+ T :: TRUE
507+ } else {
508+ T :: FALSE
509+ } ) )
510+ }
505511 }
506512
507513 /// Shifts the mask elements to the right by `OFFSET`, filling in with
508514 /// `padding` from the left.
509515 #[ inline]
510516 #[ must_use = "method returns a new mask and does not mutate the original inputs" ]
511- pub fn shift_elements_right < const OFFSET : usize > ( self , padding : T ) -> Self {
517+ pub fn shift_elements_right < const OFFSET : usize > ( self , padding : bool ) -> Self {
512518 // Safety: swizzles are safe for masks
513- unsafe { Self :: from_int_unchecked ( self . to_int ( ) . shift_elements_right :: < OFFSET > ( padding) ) }
519+ unsafe {
520+ Self :: from_int_unchecked ( self . to_int ( ) . shift_elements_right :: < OFFSET > ( if padding {
521+ T :: TRUE
522+ } else {
523+ T :: FALSE
524+ } ) )
525+ }
514526 }
515527
516528 /// Interleave two masks.
You can’t perform that action at this time.
0 commit comments