about summary refs log tree commit diff
path: root/src/docs/partial_pub_fields.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/docs/partial_pub_fields.txt')
-rw-r--r--src/docs/partial_pub_fields.txt27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/docs/partial_pub_fields.txt b/src/docs/partial_pub_fields.txt
deleted file mode 100644
index b529adf1547..00000000000
--- a/src/docs/partial_pub_fields.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-### What it does
-Checks whether partial fields of a struct are public.
-
-Either make all fields of a type public, or make none of them public
-
-### Why is this bad?
-Most types should either be:
-* Abstract data types: complex objects with opaque implementation which guard
-interior invariants and expose intentionally limited API to the outside world.
-* Data: relatively simple objects which group a bunch of related attributes together.
-
-### Example
-```
-pub struct Color {
-    pub r: u8,
-    pub g: u8,
-    b: u8,
-}
-```
-Use instead:
-```
-pub struct Color {
-    pub r: u8,
-    pub g: u8,
-    pub b: u8,
-}
-```
\ No newline at end of file