File tree Expand file tree Collapse file tree 5 files changed +9
-8
lines changed
Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ impl<T> Deref for Vec<T> {
3232
3333impl < T > Drop for Vec < T > {
3434 fn drop ( & mut self ) {
35- unsafe { Box :: from_raw ( std:: ptr:: slice_from_raw_parts_mut ( self . ptr , self . len ) ) } ;
35+ unsafe { let _ = Box :: from_raw ( std:: ptr:: slice_from_raw_parts_mut ( self . ptr , self . len ) ) ; } ;
3636 }
3737}
3838
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ impl ToStub for Module {
5252 // Inserts a value into the entries hashmap. Takes a key and an entry, creating
5353 // the internal vector if it doesn't already exist.
5454 let mut insert = |ns, entry| {
55- let bucket = entries. entry ( ns) . or_insert_with ( StdVec :: new ) ;
55+ let bucket = entries. entry ( ns) . or_default ( ) ;
5656 bucket. push ( entry) ;
5757 } ;
5858
Original file line number Diff line number Diff line change @@ -768,7 +768,7 @@ impl<'a> FromZval<'a> for &'a ZendHashTable {
768768}
769769
770770///////////////////////////////////////////
771- //// HashMap
771+ /// HashMap
772772///////////////////////////////////////////
773773
774774impl < ' a , V > TryFrom < & ' a ZendHashTable > for HashMap < String , V >
@@ -837,7 +837,7 @@ where
837837}
838838
839839///////////////////////////////////////////
840- //// Vec
840+ /// Vec
841841///////////////////////////////////////////
842842
843843impl < ' a , T > TryFrom < & ' a ZendHashTable > for Vec < T >
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ impl ClassEntry {
3434 /// # Panics
3535 ///
3636 /// Panics when allocating memory for the new object fails.
37+ #[ allow( clippy:: new_ret_no_self) ]
3738 pub fn new ( & self ) -> ZBox < ZendObject > {
3839 ZendObject :: new ( self )
3940 }
Original file line number Diff line number Diff line change @@ -56,11 +56,11 @@ impl Function {
5656 if res. is_null ( ) {
5757 return None ;
5858 }
59- return Some ( * res) ;
59+ Some ( * res)
6060 }
6161 }
6262 pub fn try_from_method ( class : & str , name : & str ) -> Option < Self > {
63- return match ClassEntry :: try_find ( class) {
63+ match ClassEntry :: try_find ( class) {
6464 None => None ,
6565 Some ( ce) => unsafe {
6666 let res = zend_hash_str_find_ptr_lc (
@@ -71,9 +71,9 @@ impl Function {
7171 if res. is_null ( ) {
7272 return None ;
7373 }
74- return Some ( * res) ;
74+ Some ( * res)
7575 } ,
76- } ;
76+ }
7777 }
7878
7979 pub fn from_function ( name : & str ) -> Self {
You can’t perform that action at this time.
0 commit comments