From d0c436949ec51f38fb7fd87396b29b098bd587f3 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Thu, 30 Sep 2021 03:59:18 +0900 Subject: [PATCH] Derive Default for CompileOpts --- src/compile.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/compile.rs b/src/compile.rs index 0ee81d3..99cd945 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -64,19 +64,13 @@ struct Compiler { opts: CompileOpts, } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Default)] pub struct CompileOpts { /// How optimized the bytecode output should be; any optimize > 0 does /// not emit assert statements pub optimize: u8, } -impl Default for CompileOpts { - fn default() -> Self { - CompileOpts { optimize: 0 } - } -} - #[derive(Debug, Clone, Copy)] struct CompileContext { loop_data: Option<(ir::BlockIdx, ir::BlockIdx)>,