diff options
| author | C. Morgan Hamill <me@cmhamill.org> | 2015-03-20 18:31:22 +0100 |
|---|---|---|
| committer | C. Morgan Hamill <me@cmhamill.org> | 2015-03-20 18:31:22 +0100 |
| commit | 95d4fba8436417a6c27522ed9b51c19a9fd7c6f9 (patch) | |
| tree | 207ec286049f158bfba74d892f8b0cbd56a60310 /Cargo.toml | |
| parent | 08a7366e0e561160a2b5a1dc01330f3f7f467469 (diff) | |
| download | mail-95d4fba8436417a6c27522ed9b51c19a9fd7c6f9.tar.gz | |
Make `to_str()` method generic over lifetime.
If I have this correct:
The output `&str` will have the same lifetime as whatever the lifetime
of the block in which it is called.
This allows using it one the output of notmuch FFI calls, by propogating
the lifetime of the safe wrapper object (e.g., `Database`) to the `&str`
returned from `to_str()`. This mirrors the lifetime of the actual
underlying C string.
If I don't grok lifetimes as well as I think, this could be a lie.
Future self: you should add unit tests to test the above explanation.
Diffstat (limited to 'Cargo.toml')
0 files changed, 0 insertions, 0 deletions
