You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code prints an arbitrary number, because the vec has already been dropped. I can also get aliasing &mut's to the same value by simply calling p.longs() multiple times, since it takes &self.
A fix to this would be to store &mut Vec and have a lifetime parameter inside LongsPtr, and have .longs() take &mut self
fnmain(){let p = rucene::core::util::LongsPtr::new(&mutvec![15],0,0);dbg!(p.longs()[0]);}
The text was updated successfully, but these errors were encountered:
The following code prints an arbitrary number, because the vec has already been dropped. I can also get aliasing &mut's to the same value by simply calling p.longs() multiple times, since it takes &self.
A fix to this would be to store &mut Vec and have a lifetime parameter inside LongsPtr, and have
.longs()
take&mut self
The text was updated successfully, but these errors were encountered: