From cd35b0d0dd87dd3f57158e60793d7d10d89c4726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B5=D0=BD=D0=B8=D1=81=20=D0=9A=D0=BE=D1=82=D0=BB?= =?UTF-8?q?=D1=8F=D1=80=D0=BE=D0=B2?= Date: Sat, 18 May 2024 21:59:12 +0300 Subject: [PATCH] 1. Minor documentation fixes 2. Update README --- .editorconfig | 14 ++++++++++++++ README.md | 15 +++++++++------ examples/contract.rs | 1 - src/lib.rs | 2 +- 4 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..fbed79f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# http://editorconfig.org + +root = true + +[*.rs] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = false +indent_style = tab +indent_size = 5 +max_line_length = 80 diff --git a/README.md b/README.md index f93a54b..4ee1fb9 100644 --- a/README.md +++ b/README.md @@ -28,19 +28,19 @@ -## !!! ATTENTION !!! +## !!! ATTENTION 1. When converting types without checking the size of the data, you really need to understand what you are doing. 2. You must understand the specifics of the platform you are using. -## Library features: +## Library features 1. Casting any type A to any type B with generic data without and with data dimension checking. 2. Ability to use transmutation in constant functions in very old versions of rust. 3. Possibility of delayed transmutation through contracts. 4. Ability to work without the standard library. -## Usage: +## Usage Add this to your Cargo.toml: @@ -54,7 +54,8 @@ and this to your source code: use cluFullTransmute::mem::transmute; ``` -## Example: +## Example + ```rust use cluFullTransmute::transmute_or_panic; use core::fmt::Display; @@ -110,7 +111,8 @@ fn main() { See all -## License: +## License + This project has a single license (LICENSE-APACHE-2.0).
@@ -123,7 +125,8 @@ This project has a single license (LICENSE-APACHE-2.0).


-### Apache License: +### Apache License +
apache2 diff --git a/examples/contract.rs b/examples/contract.rs index fd7c11a..83da66a 100644 --- a/examples/contract.rs +++ b/examples/contract.rs @@ -8,7 +8,6 @@ use cluFullTransmute::contract::Contract; situations where it can't be proven. */ -/// struct MyData { data: Contract<&'static str, &'static [u8]>, } diff --git a/src/lib.rs b/src/lib.rs index 5830d1a..1621bd1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,7 +22,7 @@ A more complete and extended version of data type conversion without constraint 1. When converting types without checking the size of the data, you really need to understand what you are doing. 2. You must understand the specifics of the platform you are using. -## Example: +## Example ```rust use cluFullTransmute::transmute_or_panic;