diff options
| author | Milo Mirate <mmirate@gmx.com> | 2022-07-18 08:38:14 -0400 |
|---|---|---|
| committer | Milo Mirate <mmirate@gmx.com> | 2022-07-18 08:38:14 -0400 |
| commit | be30c4daf4d8c54c261a346a4c4750f13b426005 (patch) | |
| tree | 0253bba19d45f1b3178109eda521abedadc2dbb5 /src/test/codegen/src-hash-algorithm | |
| parent | 8e379cec62b63d4e61a8f0b062e8be3ebfcd4a4b (diff) | |
| download | rust-be30c4daf4d8c54c261a346a4c4750f13b426005.tar.gz rust-be30c4daf4d8c54c261a346a4c4750f13b426005.zip | |
chore: change str_ref_to_string to str_ref_to_owned
ToString is implemented by many different types than &str, and represents a serialization into string data. The fact that said data is returned as owned, is an implementation detail. If merely copying borrowed string data to owned string data is all that is desired, ToOwned is a much better choice, because if the user later refactors the code such that the input is no longer an `&str`, then they will get a compiler error instead of a mysterious change-in-behavior.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions
