File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ impl Compiler {
163163 _ => {
164164 self . emit ( Instruction :: Import {
165165 name : module. clone ( ) ,
166- symbol : symbol. clone ( ) . map ( |s| s . clone ( ) ) ,
166+ symbol : symbol. clone ( ) ,
167167 } ) ;
168168 self . emit ( Instruction :: StoreName {
169169 name : match alias {
Original file line number Diff line number Diff line change @@ -736,7 +736,7 @@ pub trait AttributeProtocol {
736736fn class_get_item ( class : & PyObjectRef , attr_name : & str ) -> Option < PyObjectRef > {
737737 let class = class. borrow ( ) ;
738738 match class. payload {
739- PyObjectPayload :: Class { ref dict, .. } => dict. borrow ( ) . get ( attr_name) . map ( |v| v . clone ( ) ) ,
739+ PyObjectPayload :: Class { ref dict, .. } => dict. borrow ( ) . get ( attr_name) . cloned ( ) ,
740740 _ => panic ! ( "Only classes should be in MRO!" ) ,
741741 }
742742}
@@ -766,7 +766,7 @@ impl AttributeProtocol for PyObjectRef {
766766 None
767767 }
768768 PyObjectPayload :: Instance { ref dict } => {
769- dict. borrow ( ) . get ( attr_name) . map ( |v| v . clone ( ) )
769+ dict. borrow ( ) . get ( attr_name) . cloned ( )
770770 }
771771 _ => None ,
772772 }
You can’t perform that action at this time.
0 commit comments