From 33ddf76b269ae573dafaca8e50e5d0e6d2939e8f Mon Sep 17 00:00:00 2001 From: Jeong Yunwon Date: Mon, 2 May 2022 18:07:58 +0900 Subject: [PATCH] fn -> impl FnOnce https://github.com/RustPython/RustPython/pull/3674#discussion_r862511425 --- src/compile.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compile.rs b/src/compile.rs index 4e3f6a4..7864c03 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -119,8 +119,8 @@ fn compile_impl( ast: &Ast, source_path: String, opts: CompileOpts, - make_symbol_table: fn(&Ast) -> Result, - compile: fn(&mut Compiler, &Ast, SymbolTable) -> CompileResult<()>, + make_symbol_table: impl FnOnce(&Ast) -> Result, + compile: impl FnOnce(&mut Compiler, &Ast, SymbolTable) -> CompileResult<()>, ) -> CompileResult { let symbol_table = match make_symbol_table(ast) { Ok(x) => x,