@@ -403,7 +403,6 @@ impl Animation {
403
403
archive. read_slice ( animation. s_iframe_desc_mut ( ) ) ?;
404
404
animation. s_iframe_interval = archive. read ( ) ?;
405
405
archive. read_slice ( animation. scales_mut ( ) ) ?;
406
-
407
406
Ok ( animation)
408
407
}
409
408
@@ -465,7 +464,7 @@ impl Animation {
465
464
}
466
465
467
466
pub ( crate ) fn to_raw ( & self ) -> AnimationRaw {
468
- return AnimationRaw {
467
+ AnimationRaw {
469
468
duration : self . duration ,
470
469
num_tracks : self . num_tracks ,
471
470
name : self . name . clone ( ) ,
@@ -491,7 +490,7 @@ impl Animation {
491
490
s_iframe_interval : self . s_iframe_interval ,
492
491
s_iframe_entries : self . s_iframe_entries ( ) . to_vec ( ) ,
493
492
s_iframe_desc : self . s_iframe_desc ( ) . to_vec ( ) ,
494
- } ;
493
+ }
495
494
}
496
495
497
496
fn new ( meta : AnimationMeta ) -> Animation {
@@ -652,207 +651,207 @@ impl Animation {
652
651
/// Gets the buffer of time points.
653
652
#[ inline]
654
653
pub fn timepoints ( & self ) -> & [ f32 ] {
655
- return unsafe { slice:: from_raw_parts ( self . timepoints , self . timepoints_count as usize ) } ;
654
+ unsafe { slice:: from_raw_parts ( self . timepoints , self . timepoints_count as usize ) }
656
655
}
657
656
658
657
#[ inline]
659
658
fn timepoints_mut ( & mut self ) -> & mut [ f32 ] {
660
- return unsafe { slice:: from_raw_parts_mut ( self . timepoints , self . timepoints_count as usize ) } ;
659
+ unsafe { slice:: from_raw_parts_mut ( self . timepoints , self . timepoints_count as usize ) }
661
660
}
662
661
663
662
/// Gets the buffer of translation keys.
664
663
#[ inline]
665
664
pub fn translations ( & self ) -> & [ Float3Key ] {
666
- return unsafe { slice:: from_raw_parts ( self . translations , self . translations_count as usize ) } ;
665
+ unsafe { slice:: from_raw_parts ( self . translations , self . translations_count as usize ) }
667
666
}
668
667
669
668
#[ inline]
670
669
fn translations_mut ( & mut self ) -> & mut [ Float3Key ] {
671
- return unsafe { slice:: from_raw_parts_mut ( self . translations , self . translations_count as usize ) } ;
670
+ unsafe { slice:: from_raw_parts_mut ( self . translations , self . translations_count as usize ) }
672
671
}
673
672
674
673
#[ inline]
675
674
fn t_ratios ( & self ) -> & [ u16 ] {
676
- return unsafe { slice:: from_raw_parts ( self . t_ratios , self . translations_count as usize ) } ;
675
+ unsafe { slice:: from_raw_parts ( self . t_ratios , self . translations_count as usize ) }
677
676
}
678
677
679
678
#[ inline]
680
679
fn t_ratios_mut ( & mut self ) -> & mut [ u16 ] {
681
- return unsafe { slice:: from_raw_parts_mut ( self . t_ratios , self . translations_count as usize ) } ;
680
+ unsafe { slice:: from_raw_parts_mut ( self . t_ratios , self . translations_count as usize ) }
682
681
}
683
682
684
683
#[ inline]
685
684
fn t_previouses ( & self ) -> & [ u16 ] {
686
- return unsafe { slice:: from_raw_parts ( self . t_previouses , self . translations_count as usize ) } ;
685
+ unsafe { slice:: from_raw_parts ( self . t_previouses , self . translations_count as usize ) }
687
686
}
688
687
689
688
#[ inline]
690
689
fn t_previouses_mut ( & mut self ) -> & mut [ u16 ] {
691
- return unsafe { slice:: from_raw_parts_mut ( self . t_previouses , self . translations_count as usize ) } ;
690
+ unsafe { slice:: from_raw_parts_mut ( self . t_previouses , self . translations_count as usize ) }
692
691
}
693
692
694
693
#[ inline]
695
694
fn t_iframe_entries ( & self ) -> & [ u8 ] {
696
- return unsafe { slice:: from_raw_parts ( self . t_iframe_entries , self . t_iframe_entries_count as usize ) } ;
695
+ unsafe { slice:: from_raw_parts ( self . t_iframe_entries , self . t_iframe_entries_count as usize ) }
697
696
}
698
697
699
698
#[ inline]
700
699
fn t_iframe_entries_mut ( & mut self ) -> & mut [ u8 ] {
701
- return unsafe { slice:: from_raw_parts_mut ( self . t_iframe_entries , self . t_iframe_entries_count as usize ) } ;
700
+ unsafe { slice:: from_raw_parts_mut ( self . t_iframe_entries , self . t_iframe_entries_count as usize ) }
702
701
}
703
702
704
703
#[ inline]
705
704
fn t_iframe_desc ( & self ) -> & [ u32 ] {
706
- return unsafe { slice:: from_raw_parts ( self . t_iframe_desc , self . t_iframe_desc_count as usize ) } ;
705
+ unsafe { slice:: from_raw_parts ( self . t_iframe_desc , self . t_iframe_desc_count as usize ) }
707
706
}
708
707
709
708
#[ inline]
710
709
fn t_iframe_desc_mut ( & mut self ) -> & mut [ u32 ] {
711
- return unsafe { slice:: from_raw_parts_mut ( self . t_iframe_desc , self . t_iframe_desc_count as usize ) } ;
710
+ unsafe { slice:: from_raw_parts_mut ( self . t_iframe_desc , self . t_iframe_desc_count as usize ) }
712
711
}
713
712
714
713
/// Gets the buffer of rotation keys.
715
714
#[ inline]
716
715
pub fn rotations ( & self ) -> & [ QuaternionKey ] {
717
- return unsafe { slice:: from_raw_parts ( self . rotations , self . rotations_count as usize ) } ;
716
+ unsafe { slice:: from_raw_parts ( self . rotations , self . rotations_count as usize ) }
718
717
}
719
718
720
719
#[ inline]
721
720
fn rotations_mut ( & mut self ) -> & mut [ QuaternionKey ] {
722
- return unsafe { slice:: from_raw_parts_mut ( self . rotations , self . rotations_count as usize ) } ;
721
+ unsafe { slice:: from_raw_parts_mut ( self . rotations , self . rotations_count as usize ) }
723
722
}
724
723
725
724
#[ inline]
726
725
fn r_ratios ( & self ) -> & [ u16 ] {
727
- return unsafe { slice:: from_raw_parts ( self . r_ratios , self . rotations_count as usize ) } ;
726
+ unsafe { slice:: from_raw_parts ( self . r_ratios , self . rotations_count as usize ) }
728
727
}
729
728
730
729
#[ inline]
731
730
fn r_ratios_mut ( & mut self ) -> & mut [ u16 ] {
732
- return unsafe { slice:: from_raw_parts_mut ( self . r_ratios , self . rotations_count as usize ) } ;
731
+ unsafe { slice:: from_raw_parts_mut ( self . r_ratios , self . rotations_count as usize ) }
733
732
}
734
733
735
734
#[ inline]
736
735
fn r_previouses ( & self ) -> & [ u16 ] {
737
- return unsafe { slice:: from_raw_parts ( self . r_previouses , self . rotations_count as usize ) } ;
736
+ unsafe { slice:: from_raw_parts ( self . r_previouses , self . rotations_count as usize ) }
738
737
}
739
738
740
739
#[ inline]
741
740
fn r_previouses_mut ( & mut self ) -> & mut [ u16 ] {
742
- return unsafe { slice:: from_raw_parts_mut ( self . r_previouses , self . rotations_count as usize ) } ;
741
+ unsafe { slice:: from_raw_parts_mut ( self . r_previouses , self . rotations_count as usize ) }
743
742
}
744
743
745
744
#[ inline]
746
745
fn r_iframe_entries ( & self ) -> & [ u8 ] {
747
- return unsafe { slice:: from_raw_parts ( self . r_iframe_entries , self . r_iframe_entries_count as usize ) } ;
746
+ unsafe { slice:: from_raw_parts ( self . r_iframe_entries , self . r_iframe_entries_count as usize ) }
748
747
}
749
748
750
749
#[ inline]
751
750
fn r_iframe_entries_mut ( & mut self ) -> & mut [ u8 ] {
752
- return unsafe { slice:: from_raw_parts_mut ( self . r_iframe_entries , self . r_iframe_entries_count as usize ) } ;
751
+ unsafe { slice:: from_raw_parts_mut ( self . r_iframe_entries , self . r_iframe_entries_count as usize ) }
753
752
}
754
753
755
754
#[ inline]
756
755
fn r_iframe_desc ( & self ) -> & [ u32 ] {
757
- return unsafe { slice:: from_raw_parts ( self . r_iframe_desc , self . r_iframe_desc_count as usize ) } ;
756
+ unsafe { slice:: from_raw_parts ( self . r_iframe_desc , self . r_iframe_desc_count as usize ) }
758
757
}
759
758
760
759
#[ inline]
761
760
fn r_iframe_desc_mut ( & mut self ) -> & mut [ u32 ] {
762
- return unsafe { slice:: from_raw_parts_mut ( self . r_iframe_desc , self . r_iframe_desc_count as usize ) } ;
761
+ unsafe { slice:: from_raw_parts_mut ( self . r_iframe_desc , self . r_iframe_desc_count as usize ) }
763
762
}
764
763
765
764
/// Gets the buffer of scale keys.
766
765
#[ inline]
767
766
pub fn scales ( & self ) -> & [ Float3Key ] {
768
- return unsafe { slice:: from_raw_parts ( self . scales , self . scales_count as usize ) } ;
767
+ unsafe { slice:: from_raw_parts ( self . scales , self . scales_count as usize ) }
769
768
}
770
769
771
770
#[ inline]
772
771
fn scales_mut ( & mut self ) -> & mut [ Float3Key ] {
773
- return unsafe { slice:: from_raw_parts_mut ( self . scales , self . scales_count as usize ) } ;
772
+ unsafe { slice:: from_raw_parts_mut ( self . scales , self . scales_count as usize ) }
774
773
}
775
774
776
775
#[ inline]
777
776
fn s_ratios ( & self ) -> & [ u16 ] {
778
- return unsafe { slice:: from_raw_parts ( self . s_ratios , self . scales_count as usize ) } ;
777
+ unsafe { slice:: from_raw_parts ( self . s_ratios , self . scales_count as usize ) }
779
778
}
780
779
781
780
#[ inline]
782
781
fn s_ratios_mut ( & mut self ) -> & mut [ u16 ] {
783
- return unsafe { slice:: from_raw_parts_mut ( self . s_ratios , self . scales_count as usize ) } ;
782
+ unsafe { slice:: from_raw_parts_mut ( self . s_ratios , self . scales_count as usize ) }
784
783
}
785
784
786
785
#[ inline]
787
786
fn s_previouses ( & self ) -> & [ u16 ] {
788
- return unsafe { slice:: from_raw_parts ( self . s_previouses , self . scales_count as usize ) } ;
787
+ unsafe { slice:: from_raw_parts ( self . s_previouses , self . scales_count as usize ) }
789
788
}
790
789
791
790
#[ inline]
792
791
fn s_previouses_mut ( & mut self ) -> & mut [ u16 ] {
793
- return unsafe { slice:: from_raw_parts_mut ( self . s_previouses , self . scales_count as usize ) } ;
792
+ unsafe { slice:: from_raw_parts_mut ( self . s_previouses , self . scales_count as usize ) }
794
793
}
795
794
796
795
#[ inline]
797
796
fn s_iframe_entries ( & self ) -> & [ u8 ] {
798
- return unsafe { slice:: from_raw_parts ( self . s_iframe_entries , self . s_iframe_entries_count as usize ) } ;
797
+ unsafe { slice:: from_raw_parts ( self . s_iframe_entries , self . s_iframe_entries_count as usize ) }
799
798
}
800
799
801
800
#[ inline]
802
801
fn s_iframe_entries_mut ( & mut self ) -> & mut [ u8 ] {
803
- return unsafe { slice:: from_raw_parts_mut ( self . s_iframe_entries , self . s_iframe_entries_count as usize ) } ;
802
+ unsafe { slice:: from_raw_parts_mut ( self . s_iframe_entries , self . s_iframe_entries_count as usize ) }
804
803
}
805
804
806
805
#[ inline]
807
806
fn s_iframe_desc ( & self ) -> & [ u32 ] {
808
- return unsafe { slice:: from_raw_parts ( self . s_iframe_desc , self . s_iframe_desc_count as usize ) } ;
807
+ unsafe { slice:: from_raw_parts ( self . s_iframe_desc , self . s_iframe_desc_count as usize ) }
809
808
}
810
809
811
810
#[ inline]
812
811
fn s_iframe_desc_mut ( & mut self ) -> & mut [ u32 ] {
813
- return unsafe { slice:: from_raw_parts_mut ( self . s_iframe_desc , self . s_iframe_desc_count as usize ) } ;
812
+ unsafe { slice:: from_raw_parts_mut ( self . s_iframe_desc , self . s_iframe_desc_count as usize ) }
814
813
}
815
814
816
815
/// Gets the buffer of translation keys.
817
816
#[ inline]
818
817
pub fn translations_ctrl ( & self ) -> KeyframesCtrl < ' _ > {
819
- return unsafe {
818
+ unsafe {
820
819
KeyframesCtrl {
821
820
ratios : slice:: from_raw_parts ( self . t_ratios , self . translations_count as usize ) ,
822
821
previouses : slice:: from_raw_parts ( self . t_previouses , self . translations_count as usize ) ,
823
822
iframe_entries : slice:: from_raw_parts ( self . t_iframe_entries , self . t_iframe_entries_count as usize ) ,
824
823
iframe_desc : slice:: from_raw_parts ( self . t_iframe_desc , self . t_iframe_desc_count as usize ) ,
825
824
iframe_interval : self . t_iframe_interval ,
826
825
}
827
- } ;
826
+ }
828
827
}
829
828
830
829
/// Gets the buffer of rotation keys.
831
830
#[ inline]
832
831
pub fn rotations_ctrl ( & self ) -> KeyframesCtrl < ' _ > {
833
- return unsafe {
832
+ unsafe {
834
833
KeyframesCtrl {
835
834
ratios : slice:: from_raw_parts ( self . r_ratios , self . rotations_count as usize ) ,
836
835
previouses : slice:: from_raw_parts ( self . r_previouses , self . rotations_count as usize ) ,
837
836
iframe_entries : slice:: from_raw_parts ( self . r_iframe_entries , self . r_iframe_entries_count as usize ) ,
838
837
iframe_desc : slice:: from_raw_parts ( self . r_iframe_desc , self . r_iframe_desc_count as usize ) ,
839
838
iframe_interval : self . r_iframe_interval ,
840
839
}
841
- } ;
840
+ }
842
841
}
843
842
844
843
/// Gets the buffer of scale keys.
845
844
#[ inline]
846
845
pub fn scales_ctrl ( & self ) -> KeyframesCtrl < ' _ > {
847
- return unsafe {
846
+ unsafe {
848
847
KeyframesCtrl {
849
848
ratios : slice:: from_raw_parts ( self . s_ratios , self . scales_count as usize ) ,
850
849
previouses : slice:: from_raw_parts ( self . s_previouses , self . scales_count as usize ) ,
851
850
iframe_entries : slice:: from_raw_parts ( self . s_iframe_entries , self . s_iframe_entries_count as usize ) ,
852
851
iframe_desc : slice:: from_raw_parts ( self . s_iframe_desc , self . s_iframe_desc_count as usize ) ,
853
852
iframe_interval : self . s_iframe_interval ,
854
853
}
855
- } ;
854
+ }
856
855
}
857
856
}
858
857
0 commit comments