@@ -98,7 +98,7 @@ impl Frame {
9898 /// let atom = frame.atom(0);
9999 /// assert_eq!(atom.name(), "Zn");
100100 /// ```
101- pub fn atom ( & self , index : usize ) -> AtomRef {
101+ pub fn atom ( & self , index : usize ) -> AtomRef < ' _ > {
102102 unsafe {
103103 let handle = ffi:: chfl_atom_from_frame ( self . as_mut_ptr_MANUALLY_CHECKING_BORROW ( ) , index as u64 ) ;
104104 Atom :: ref_from_ptr ( handle)
@@ -122,7 +122,7 @@ impl Frame {
122122 /// frame.atom_mut(0).set_name("Fe");
123123 /// assert_eq!(frame.atom(0).name(), "Fe");
124124 /// ```
125- pub fn atom_mut ( & mut self , index : usize ) -> AtomMut {
125+ pub fn atom_mut ( & mut self , index : usize ) -> AtomMut < ' _ > {
126126 unsafe {
127127 let handle = ffi:: chfl_atom_from_frame ( self . as_mut_ptr ( ) , index as u64 ) ;
128128 Atom :: ref_mut_from_ptr ( handle)
@@ -143,7 +143,7 @@ impl Frame {
143143 pub fn size ( & self ) -> usize {
144144 let mut size = 0 ;
145145 unsafe {
146- check_success ( ffi:: chfl_frame_atoms_count ( self . as_ptr ( ) , & mut size) ) ;
146+ check_success ( ffi:: chfl_frame_atoms_count ( self . as_ptr ( ) , & raw mut size) ) ;
147147 }
148148 #[ allow( clippy:: cast_possible_truncation) ]
149149 return size as usize ;
@@ -337,7 +337,7 @@ impl Frame {
337337 self . as_ptr ( ) ,
338338 i as u64 ,
339339 j as u64 ,
340- & mut distance,
340+ & raw mut distance,
341341 ) ) ;
342342 }
343343 return distance;
@@ -366,7 +366,7 @@ impl Frame {
366366 i as u64 ,
367367 j as u64 ,
368368 k as u64 ,
369- & mut angle,
369+ & raw mut angle,
370370 ) ) ;
371371 }
372372 return angle;
@@ -397,7 +397,7 @@ impl Frame {
397397 j as u64 ,
398398 k as u64 ,
399399 m as u64 ,
400- & mut dihedral,
400+ & raw mut dihedral,
401401 ) ) ;
402402 }
403403 return dihedral;
@@ -430,7 +430,7 @@ impl Frame {
430430 j as u64 ,
431431 k as u64 ,
432432 m as u64 ,
433- & mut distance,
433+ & raw mut distance,
434434 ) ) ;
435435 }
436436 return distance;
@@ -454,8 +454,8 @@ impl Frame {
454454 unsafe {
455455 check_success ( ffi:: chfl_frame_positions (
456456 self . as_mut_ptr_MANUALLY_CHECKING_BORROW ( ) ,
457- & mut ptr,
458- & mut natoms,
457+ & raw mut ptr,
458+ & raw mut natoms,
459459 ) ) ;
460460 }
461461
@@ -486,7 +486,11 @@ impl Frame {
486486 let mut ptr = std:: ptr:: null_mut ( ) ;
487487 let mut natoms = 0 ;
488488 unsafe {
489- check_success ( ffi:: chfl_frame_positions ( self . as_mut_ptr ( ) , & mut ptr, & mut natoms) ) ;
489+ check_success ( ffi:: chfl_frame_positions (
490+ self . as_mut_ptr ( ) ,
491+ & raw mut ptr,
492+ & raw mut natoms,
493+ ) ) ;
490494 }
491495 #[ allow( clippy:: cast_possible_truncation) ]
492496 let size = natoms as usize ;
@@ -518,8 +522,8 @@ impl Frame {
518522 unsafe {
519523 check_success ( ffi:: chfl_frame_velocities (
520524 self . as_mut_ptr_MANUALLY_CHECKING_BORROW ( ) ,
521- & mut ptr,
522- & mut natoms,
525+ & raw mut ptr,
526+ & raw mut natoms,
523527 ) ) ;
524528 }
525529 #[ allow( clippy:: cast_possible_truncation) ]
@@ -554,7 +558,11 @@ impl Frame {
554558 let mut ptr = std:: ptr:: null_mut ( ) ;
555559 let mut natoms = 0 ;
556560 unsafe {
557- check_success ( ffi:: chfl_frame_velocities ( self . as_mut_ptr ( ) , & mut ptr, & mut natoms) ) ;
561+ check_success ( ffi:: chfl_frame_velocities (
562+ self . as_mut_ptr ( ) ,
563+ & raw mut ptr,
564+ & raw mut natoms,
565+ ) ) ;
558566 }
559567 #[ allow( clippy:: cast_possible_truncation) ]
560568 let size = natoms as usize ;
@@ -577,7 +585,7 @@ impl Frame {
577585 pub fn has_velocities ( & self ) -> bool {
578586 let mut res = 0 ;
579587 unsafe {
580- check_success ( ffi:: chfl_frame_has_velocities ( self . as_ptr ( ) , & mut res) ) ;
588+ check_success ( ffi:: chfl_frame_has_velocities ( self . as_ptr ( ) , & raw mut res) ) ;
581589 }
582590 return res != 0 ;
583591 }
@@ -610,7 +618,7 @@ impl Frame {
610618 /// let cell = frame.cell();
611619 /// assert_eq!(cell.shape(), CellShape::Infinite);
612620 /// ```
613- pub fn cell ( & self ) -> UnitCellRef {
621+ pub fn cell ( & self ) -> UnitCellRef < ' _ > {
614622 unsafe {
615623 let handle = ffi:: chfl_cell_from_frame ( self . as_mut_ptr_MANUALLY_CHECKING_BORROW ( ) ) ;
616624 UnitCell :: ref_from_ptr ( handle)
@@ -629,7 +637,7 @@ impl Frame {
629637 /// frame.cell_mut().set_shape(CellShape::Triclinic).unwrap();
630638 /// assert_eq!(frame.cell().shape(), CellShape::Triclinic);
631639 /// ```
632- pub fn cell_mut ( & mut self ) -> UnitCellMut {
640+ pub fn cell_mut ( & mut self ) -> UnitCellMut < ' _ > {
633641 unsafe {
634642 let handle = ffi:: chfl_cell_from_frame ( self . as_mut_ptr ( ) ) ;
635643 UnitCell :: ref_mut_from_ptr ( handle)
@@ -666,7 +674,7 @@ impl Frame {
666674 /// let topology = frame.topology();
667675 /// assert_eq!(topology.size(), 42);
668676 /// ```
669- pub fn topology ( & self ) -> TopologyRef {
677+ pub fn topology ( & self ) -> TopologyRef < ' _ > {
670678 unsafe {
671679 let handle = ffi:: chfl_topology_from_frame ( self . as_ptr ( ) ) ;
672680 Topology :: ref_from_ptr ( handle)
@@ -709,7 +717,7 @@ impl Frame {
709717 pub fn step ( & self ) -> usize {
710718 let mut step = 0 ;
711719 unsafe {
712- check_success ( ffi:: chfl_frame_step ( self . as_ptr ( ) , & mut step) ) ;
720+ check_success ( ffi:: chfl_frame_step ( self . as_ptr ( ) , & raw mut step) ) ;
713721 }
714722 #[ allow( clippy:: cast_possible_truncation) ]
715723 return step as usize ;
@@ -853,10 +861,10 @@ impl Frame {
853861 /// }
854862 /// }
855863 /// ```
856- pub fn properties ( & self ) -> PropertiesIter {
864+ pub fn properties ( & self ) -> PropertiesIter < ' _ > {
857865 let mut count = 0 ;
858866 unsafe {
859- check_success ( ffi:: chfl_frame_properties_count ( self . as_ptr ( ) , & mut count) ) ;
867+ check_success ( ffi:: chfl_frame_properties_count ( self . as_ptr ( ) , & raw mut count) ) ;
860868 }
861869
862870 #[ allow( clippy:: cast_possible_truncation) ]
0 commit comments