Collection of Snippets for Rust

Just copy the [Rust] section from the code below into your snippets file, e.g. in ~/.config/geany/snippets.conf.

[Rust]
enum=enum %cursor% {\n\t%cursor%,\n}\n
fn=fn %cursor%() {\n\t%cursor%\n}\n
for=for elem in %cursor% {\n\t%cursor%\n}\n
ife=if %cursor% {\n\t%cursor%\n} else {\n\t%cursor%\n}\n
if=if %cursor% {\n\t%cursor%\n}\n
loop=loop {\n\t%cursor%\n}\n
main=fn main() {\n\t%cursor%\n}\n
match=let %cursor% = match %cursor% {\n\tOk(%cursor%) => %cursor%,\n\tErr(_) => {\n\t\tpanic!("Error: {:?}", error)\n\t},\n};\n
print=println!("%cursor%{}", %cursor%);
std=use std::io%cursor%;\n
while=while %cursor% {\n\t%cursor%\n}\n
Print/export