File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 146146 clippy:: redundant_pub_crate,
147147 clippy:: option_if_let_else,
148148 clippy:: ptr_as_ptr,
149+ clippy:: ref_as_ptr,
149150 clippy:: doc_markdown,
150151 clippy:: semicolon_if_nothing_returned,
151152 clippy:: if_not_else
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ impl<T> Iterator for Drain<'_, T> {
7373 fn next ( & mut self ) -> Option < T > {
7474 self . iter
7575 . next ( )
76- . map ( |elt| unsafe { ptr:: read ( elt as * const _ ) } )
76+ . map ( |elt| unsafe { ptr:: read ( core :: ptr :: from_ref ( elt) ) } )
7777 }
7878
7979 fn size_hint ( & self ) -> ( usize , Option < usize > ) {
@@ -86,7 +86,7 @@ impl<T> DoubleEndedIterator for Drain<'_, T> {
8686 fn next_back ( & mut self ) -> Option < T > {
8787 self . iter
8888 . next_back ( )
89- . map ( |elt| unsafe { ptr:: read ( elt as * const _ ) } )
89+ . map ( |elt| unsafe { ptr:: read ( core :: ptr :: from_ref ( elt) ) } )
9090 }
9191}
9292
You can’t perform that action at this time.
0 commit comments