From cf3c1c15b5a3b7196906c59266d7bede250d1fff Mon Sep 17 00:00:00 2001 From: Luflosi Date: Tue, 4 Jun 2024 15:03:03 +0200 Subject: [PATCH] Use tabs for indentation of rust code This is my preference. --- .editorconfig | 23 +++++++++++++++++++++++ .rustfmt.toml | 2 ++ main.rs | 3 +++ 3 files changed, 28 insertions(+) create mode 100644 .editorconfig create mode 100644 .rustfmt.toml create mode 100644 main.rs diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..be5bac9 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,23 @@ +# EditorConfig configuration for zonewatch +# https://EditorConfig.org + +# Top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file, utf-8 charset +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 + +[*.rs] +indent_style = tab + +[*.nix] +indent_size = 2 +indent_style = space + +[*.lock] +insert_final_newline = unset +indent_size = unset diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 0000000..4d17809 --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1,2 @@ +edition = "2021" +hard_tabs = true diff --git a/main.rs b/main.rs new file mode 100644 index 0000000..a30eb95 --- /dev/null +++ b/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}