Skip to content

Commit 75b3e0d

Browse files
committed
fn -> impl FnOnce
RustPython#3674 (comment)
1 parent 13e602b commit 75b3e0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/compile.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ fn compile_impl<Ast: ?Sized>(
119119
ast: &Ast,
120120
source_path: String,
121121
opts: CompileOpts,
122-
make_symbol_table: fn(&Ast) -> Result<SymbolTable, symboltable::SymbolTableError>,
123-
compile: fn(&mut Compiler, &Ast, SymbolTable) -> CompileResult<()>,
122+
make_symbol_table: impl FnOnce(&Ast) -> Result<SymbolTable, symboltable::SymbolTableError>,
123+
compile: impl FnOnce(&mut Compiler, &Ast, SymbolTable) -> CompileResult<()>,
124124
) -> CompileResult<CodeObject> {
125125
let symbol_table = match make_symbol_table(ast) {
126126
Ok(x) => x,

0 commit comments

Comments
 (0)