From ba6050801f25ac46b1caae0889664871ce36b836 Mon Sep 17 00:00:00 2001 From: shenjack-mac <3695888@qq.com> Date: Wed, 2 Aug 2023 19:41:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=8A=E5=95=8A=E5=95=8A=E5=95=8A=E5=95=8A?= =?UTF-8?q?=E5=95=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 7 +++++++ Cargo.toml | 8 ++++++++ src/main.rs | 5 +++++ src/read.rs | 1 + src/rustfmt.toml | 23 +++++++++++++++++++++++ 5 files changed, 44 insertions(+) create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 src/main.rs create mode 100644 src/read.rs create mode 100644 src/rustfmt.toml diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..f9bf312 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "nbt-rust" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..5362f3b --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "nbt-rust" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..afeeb3c --- /dev/null +++ b/src/main.rs @@ -0,0 +1,5 @@ +mod data; + +fn main() { + println!("Hello, world!"); +} diff --git a/src/read.rs b/src/read.rs new file mode 100644 index 0000000..a5a3488 --- /dev/null +++ b/src/read.rs @@ -0,0 +1 @@ +use crate::data::NbtValue; \ No newline at end of file diff --git a/src/rustfmt.toml b/src/rustfmt.toml new file mode 100644 index 0000000..83ba4b7 --- /dev/null +++ b/src/rustfmt.toml @@ -0,0 +1,23 @@ +# cargo fmt config + +# 最大行长 +max_width = 150 +# 链式调用的最大长度 +chain_width = 100 +# 数组的最大长度 +array_width = 100 +# 函数参数的最大长度 +attr_fn_like_width = 100 +# 函数调用参数的最大长度 +fn_call_width = 80 +# 简单函数格式化为单行 +fn_single_line = true + +# 自动对齐最大长度 +enum_discrim_align_threshold = 5 +# 字段初始化使用简写 +use_field_init_shorthand = true +# 是否使用彩色输出 +color = "Always" + +edition = "2021"