From 3a4a595e4a7e97ef9653cf00e49c2f74178f0e7d Mon Sep 17 00:00:00 2001 From: Luflosi Date: Mon, 18 Mar 2024 10:26:59 +0100 Subject: [PATCH] Use tabs for indentation of rust code This is my preference. --- .editorconfig | 23 +++++++++++++++++++++++ .rustfmt.toml | 5 +++++ src/main.rs | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .editorconfig create mode 100644 .rustfmt.toml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..5e62a00 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,23 @@ +# EditorConfig configuration for dyndnsd +# 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..1e2f211 --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2024 Luflosi +# SPDX-License-Identifier: CC0-1.0 + +edition = "2021" +hard_tabs = true diff --git a/src/main.rs b/src/main.rs index e7a11a9..a30eb95 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,3 @@ fn main() { - println!("Hello, world!"); + println!("Hello, world!"); }