From 6ad831a12dc02d224e32685823487e0eb7f0f8f7 Mon Sep 17 00:00:00 2001 From: Patrick Auernig Date: Mon, 31 Jul 2023 18:17:37 +0200 Subject: [PATCH] Add editorconfig and missing unstable_features option --- .editorconfig | 12 ++++++++++++ rustfmt.toml | 6 ++++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c1e2c64 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/rustfmt.toml b/rustfmt.toml index b99c2a4..12080b4 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,13 +1,15 @@ edition = "2021" -# Just enforce it here as well instead of relying on editorconfig alone +# Already set in editorconfig, just repeated here to be sure hard_tabs = false tab_spaces = 4 newline_style = "Unix" +# Unstable features +unstable_features = true +version = "Two" imports_granularity = "Module" group_imports = "StdExternalCrate" - force_multiline_blocks = false fn_single_line = false comment_width = 100