Skip to content

Commit f35284c

Browse files
committed
Handle error control flow in single branch
1 parent 40397a4 commit f35284c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

derive/src/compile_bytecode.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,16 @@ impl CompilationSource {
185185
Err(e)
186186
});
187187

188-
if code.is_err() && stem.starts_with("badsyntax_") {
189-
continue;
190-
}
188+
let code = match code {
189+
Ok(code) => code,
190+
Err(_) if stem.starts_with("badsyntax_") => continue,
191+
Err(e) => return Err(e),
192+
};
191193

192194
code_map.insert(
193195
module_name,
194196
FrozenModule {
195-
code: code?,
197+
code,
196198
package: is_init,
197199
},
198200
);

0 commit comments

Comments
 (0)