FStarLang / karamel

KaRaMeL is a tool for extracting low-level F* programs to readable C code
Apache License 2.0
394 stars 58 forks source link

Do not generate Rust return type when it is unit #442

Closed R1kM closed 2 months ago

R1kM commented 2 months ago

Small code quality improvement to Rust generation: so far, the return type of a function was always printed (through the -> ty notation). When it is unit, it is not needed and raises linter warnings. This PR special-cases the return type unit during printing of function declarations.