mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Codify &str
-> String
conversions in code style
This commit is contained in:
parent
36f0226751
commit
5e87accfc7
1 changed files with 6 additions and 0 deletions
|
@ -196,3 +196,9 @@ warn!("Everything is on fire");
|
||||||
```
|
```
|
||||||
|
|
||||||
**Rationale:** uniformity, it's clearer which log crate is used.
|
**Rationale:** uniformity, it's clearer which log crate is used.
|
||||||
|
|
||||||
|
## `&str` -> `String` conversion
|
||||||
|
|
||||||
|
Prefer using `.to_owned()`, rather than `.to_string()`, `.into()`, `String::from`, etc.
|
||||||
|
|
||||||
|
**Rationale:** uniformity, intent clarity.
|
||||||
|
|
Loading…
Reference in a new issue