Remove serde imports section from CONTRIBUTING.md

These rules can now be enforced by clippy.
This commit is contained in:
Jonas Platte 2022-01-03 12:21:11 +01:00
parent a67738a3fb
commit 21239bcf1a
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

View File

@ -130,23 +130,6 @@ use ruma_api::ruma_api;
use super::MyType; use super::MyType;
``` ```
### Serde Imports
When importing methods and types from `serde_json`, methods should be such as
`serde_json::{from,to}_{slice,string,value,vec}` should be imported as
`{from,to}_json_{slice,string,value,vec}`.
For example:
```rust
use serde_json::{
from_value as from_json_value,
to_str as to_json_str,
};
```
Also, `serde_json::Value` should be imported as `JsonValue`.
### Commit Messages ### Commit Messages
Write commit messages using the imperative mood, as if completing the sentence: Write commit messages using the imperative mood, as if completing the sentence: