mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-22 04:25:25 +00:00
Derive Default for CompileOpts
This commit is contained in:
parent
ae122c6478
commit
d0c436949e
1 changed files with 1 additions and 7 deletions
|
@ -64,19 +64,13 @@ struct Compiler {
|
||||||
opts: CompileOpts,
|
opts: CompileOpts,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct CompileOpts {
|
pub struct CompileOpts {
|
||||||
/// How optimized the bytecode output should be; any optimize > 0 does
|
/// How optimized the bytecode output should be; any optimize > 0 does
|
||||||
/// not emit assert statements
|
/// not emit assert statements
|
||||||
pub optimize: u8,
|
pub optimize: u8,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for CompileOpts {
|
|
||||||
fn default() -> Self {
|
|
||||||
CompileOpts { optimize: 0 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
struct CompileContext {
|
struct CompileContext {
|
||||||
loop_data: Option<(ir::BlockIdx, ir::BlockIdx)>,
|
loop_data: Option<(ir::BlockIdx, ir::BlockIdx)>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue