Skip to content

Commit 4025346

Browse files
committed
Remove section on Organization
This section was vague and probably unactionable. It basically just exhorts the reader to be "sensible", and gives a couple specific examples of where Serde does somthing that is claimed to be sensible. We can reintroduce this section if we come up with a way to give firmer advice here.
1 parent 4406d8e commit 4025346

File tree

3 files changed

+0
-60
lines changed

3 files changed

+0
-60
lines changed

src/SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
[About](about.md)
44
[Checklist](checklist.md)
55

6-
- [Organization](organization.md)
76
- [Naming](naming.md)
87
- [Interoperability](interoperability.md)
98
- [Macros](macros.md)

src/checklist.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
<!-- Read CONTRIBUTING.md before writing new guidelines -->
44

5-
- **Organization** *(crate is structured in an intelligible way)*
6-
- [ ] Crate root re-exports common functionality ([C-REEXPORT])
7-
- [ ] Modules provide a sensible API hierarchy ([C-HIERARCHY])
85
- **Naming** *(crate aligns with Rust naming conventions)*
96
- [ ] Casing conforms to RFC 430 ([C-CASE])
107
- [ ] Ad-hoc conversions follow `as_`, `to_`, `into_` conventions ([C-CONV])
@@ -79,9 +76,6 @@
7976
- [ ] Crate and its dependencies have a permissive license ([C-PERMISSIVE])
8077

8178

82-
[C-REEXPORT]: organization.html#c-reexport
83-
[C-HIERARCHY]: organization.html#c-hierarchy
84-
8579
[C-CASE]: naming.html#c-case
8680
[C-CONV]: naming.html#c-naming
8781
[C-ITER]: naming.html#c-iter

src/organization.md

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1 @@
11
# Organization
2-
3-
4-
<a id="c-reexport"></a>
5-
## Crate root re-exports common functionality (C-REEXPORT)
6-
7-
Crates `pub use` the most common types for convenience, so that clients do not
8-
have to remember or write the crate's module hierarchy to use these types.
9-
10-
Re-exporting is covered in more detail in the *The Rust Programming Language*
11-
under [Crates and Modules][reexport].
12-
13-
[reexport]: https://doc.rust-lang.org/book/first-edition/crates-and-modules.html#re-exporting-with-pub-use
14-
15-
### Examples from `serde_json`
16-
17-
The [`serde_json::Value`] type is the most commonly used type from `serde_json`.
18-
It is a re-export of a type that lives elsewhere in the module hierarchy, at
19-
`serde_json::value::Value`. The [`serde_json::value`][value-mod] module defines
20-
other JSON-value-related things that are not re-exported. For example
21-
[`serde_json::value::Index`] is the trait that defines types that can be used to
22-
index into a `Value` using square bracket indexing notation. The `Index` trait
23-
is not re-exported at the crate root because it would be comparatively rare for
24-
a client crate to need to refer to it.
25-
26-
[`serde_json::Value`]: https://docs.serde.rs/serde_json/enum.Value.html
27-
[value-mod]: https://docs.serde.rs/serde_json/value/index.html
28-
[`serde_json::value::Index`]: https://docs.serde.rs/serde_json/value/trait.Index.html
29-
30-
In addition to types, functions can be re-exported as well. In `serde_json` the
31-
[`serde_json::from_str`] function is a re-export of a function from the
32-
[`serde_json::de`] deserialization module, which contains other less common
33-
deserialization-related functionality that is not re-exported.
34-
35-
[`serde_json::from_str`]: https://docs.serde.rs/serde_json/fn.from_str.html
36-
[`serde_json::de`]: https://docs.serde.rs/serde_json/de/index.html
37-
38-
39-
<a id="c-hierarchy"></a>
40-
## Modules provide a sensible API hierarchy (C-HIERARCHY)
41-
42-
### Examples from Serde
43-
44-
The `serde` crate is two independent frameworks in one crate - a serialization
45-
half and a deserialization half. The crate is divided accordingly into
46-
[`serde::ser`] and [`serde::de`]. Part of the deserialization framework is
47-
isolated under [`serde::de::value`] because it is a relatively large API surface
48-
that is relatively unimportant, and it would crowd the more common, more
49-
important functionality located in `serde::de` if it were to share the same
50-
namespace.
51-
52-
[`serde::ser`]: https://docs.serde.rs/serde/ser/index.html
53-
[`serde::de`]: https://docs.serde.rs/serde/de/index.html
54-
[`serde::de::value`]: https://docs.serde.rs/serde/de/value/index.html

0 commit comments

Comments
 (0)