File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed
Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -13,18 +13,23 @@ mod decl {
1313 let co = if let Ok ( co) = obj. get_attr ( "__code__" , vm) {
1414 // Method or function:
1515 PyRef :: try_from_object ( vm, co) ?
16- } else if let Ok ( _co_str ) = PyStrRef :: try_from_object ( vm, obj. clone ( ) ) {
16+ } else if let Ok ( co_str ) = PyStrRef :: try_from_object ( vm, obj. clone ( ) ) {
1717 #[ cfg( not( feature = "compiler" ) ) ]
18- return Err ( vm. new_runtime_error (
19- "dis.dis() with str argument requires `compiler` feature" . to_owned ( ) ,
20- ) ) ;
18+ {
19+ let _ = co_str;
20+ return Err ( vm. new_runtime_error (
21+ "dis.dis() with str argument requires `compiler` feature" . to_owned ( ) ,
22+ ) ) ;
23+ }
2124 #[ cfg( feature = "compiler" ) ]
22- vm. compile (
23- _co_str. as_str ( ) ,
24- crate :: vm:: compiler:: Mode :: Exec ,
25- "<dis>" . to_owned ( ) ,
26- )
27- . map_err ( |err| vm. new_syntax_error ( & err, Some ( _co_str. as_str ( ) ) ) ) ?
25+ {
26+ vm. compile (
27+ co_str. as_str ( ) ,
28+ crate :: vm:: compiler:: Mode :: Exec ,
29+ "<dis>" . to_owned ( ) ,
30+ )
31+ . map_err ( |err| vm. new_syntax_error ( & err, Some ( co_str. as_str ( ) ) ) ) ?
32+ }
2833 } else {
2934 PyRef :: try_from_object ( vm, obj) ?
3035 } ;
You can’t perform that action at this time.
0 commit comments