File tree Expand file tree Collapse file tree 2 files changed +28
-7
lines changed Expand file tree Collapse file tree 2 files changed +28
-7
lines changed Original file line number Diff line number Diff line change
1
+ RUSTPYTHONPATH=Lib
2
+ export RUSTPYTHONPATH
3
+
4
+ ACTIONS=(" cargo build" " cargo build --release" " cargo fmt --all" " cargo clippy --all -- -Dwarnings" " cargo test --all" " cargo run --release -- -m test -v" " cd tests" " pytest" " cd .." )
5
+ ACT_RES=0
6
+ FAILS=()
7
+
8
+ for act in " ${ACTIONS[@]} " ; do
9
+ $act
10
+ if ! [ $? -eq 0 ]; then
11
+ ACT_RES=1
12
+ FAILS+=(" ${act} " )
13
+ fi
14
+ done
15
+
16
+ echo
17
+ echo
18
+ echo " *********************"
19
+ if ! [ $ACT_RES -eq 0 ]; then
20
+ echo " PDC failed"
21
+ for el in " ${FAILS[@]} " ; do
22
+ echo " Fail ${el} "
23
+ done
24
+ echo
25
+ else
26
+ echo " PDC passed"
27
+ fi
Original file line number Diff line number Diff line change @@ -114,13 +114,7 @@ impl NameProtocol for Scope {
114
114
115
115
fn store_cell ( & self , vm : & VirtualMachine , name : & str , value : PyObjectRef ) {
116
116
// find the innermost outer scope that contains the symbol name
117
- if let Some ( locals) = self
118
- . locals
119
- . iter ( )
120
- . rev ( )
121
- . filter ( |l| l. contains_key ( name, vm) )
122
- . nth ( 0 )
123
- {
117
+ if let Some ( locals) = self . locals . iter ( ) . rev ( ) . find ( |l| l. contains_key ( name, vm) ) {
124
118
// add to the symbol
125
119
locals. set_item ( name, value, vm) . unwrap ( ) ;
126
120
} else {
You can’t perform that action at this time.
0 commit comments