From 47f56bc38967cdc79c1f7519be6fcaad4b11b559 Mon Sep 17 00:00:00 2001 From: Awiteb Date: Wed, 26 Jun 2024 23:02:33 +0300 Subject: [PATCH] chore: Add rust files Signed-off-by: Awiteb --- rust-toolchain.toml | 13 +++++++++++++ rustfmt.toml | 21 +++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 rust-toolchain.toml create mode 100644 rustfmt.toml diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..a8cdd9a --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,13 @@ +[toolchain] +# We use nightly in development only, the project will always be compliant with +# the latest stable release and the MSRV as defined in `Cargo.toml` file. +channel = "nightly-2024-06-12" +components = [ + "rustc", + "cargo", + "rust-std", + "rust-src", + "rustfmt", + "rust-analyzer", + "clippy", +] diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..71382fc --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,21 @@ +unstable_features = true +version = "Two" + +combine_control_expr = false +wrap_comments = true +condense_wildcard_suffixes = true +edition = "2021" +enum_discrim_align_threshold = 20 +force_multiline_blocks = true +format_code_in_doc_comments = true +format_generated_files = false +format_macro_matchers = true +format_strings = true +imports_layout = "HorizontalVertical" +newline_style = "Unix" +normalize_comments = true +reorder_impl_items = true +group_imports = "StdExternalCrate" +single_line_let_else_max_width = 0 +struct_field_align_threshold = 20 +use_try_shorthand = true