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 {
163
163
_ => {
164
164
self . emit ( Instruction :: Import {
165
165
name : module. clone ( ) ,
166
- symbol : symbol. clone ( ) . map ( |s| s . clone ( ) ) ,
166
+ symbol : symbol. clone ( ) ,
167
167
} ) ;
168
168
self . emit ( Instruction :: StoreName {
169
169
name : match alias {
Original file line number Diff line number Diff line change @@ -736,7 +736,7 @@ pub trait AttributeProtocol {
736
736
fn class_get_item ( class : & PyObjectRef , attr_name : & str ) -> Option < PyObjectRef > {
737
737
let class = class. borrow ( ) ;
738
738
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 ( ) ,
740
740
_ => panic ! ( "Only classes should be in MRO!" ) ,
741
741
}
742
742
}
@@ -766,7 +766,7 @@ impl AttributeProtocol for PyObjectRef {
766
766
None
767
767
}
768
768
PyObjectPayload :: Instance { ref dict } => {
769
- dict. borrow ( ) . get ( attr_name) . map ( |v| v . clone ( ) )
769
+ dict. borrow ( ) . get ( attr_name) . cloned ( )
770
770
}
771
771
_ => None ,
772
772
}
You can’t perform that action at this time.
0 commit comments