]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #53113 - kpp:more_docs_for_cow, r=GuillaumeGomez
authorPietro Albini <pietro@pietroalbini.org>
Thu, 30 Aug 2018 18:15:25 +0000 (20:15 +0200)
committerGitHub <noreply@github.com>
Thu, 30 Aug 2018 18:15:25 +0000 (20:15 +0200)
commit2531d43f19753366c551b3fe5a34658cf34f5f06
tree14020a4225500577634fc1545326ed09738bc03e
parentb7e74a56140d4a89d0cf917788f16d8134d79eb4
parent5bfb7850782c440f27e0a5b64157aed9e04c5cc6
Rollup merge of #53113 - kpp:more_docs_for_cow, r=GuillaumeGomez

Add example for Cow

Add one more example that shows how to keep `Cow` in a struct.

Link to playground: https://play.rust-lang.org/?gist=a9256bdd034b44bc3cdd0044bbcdbb7c&version=stable&mode=debug&edition=2015

Users ask this question in [ruRust](https://gitter.im/ruRust/general) chat time to time and it is not obvious to add `ToOwned<Owned=Target>` to requirements of generic params.