diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-10-29 14:47:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-29 14:47:49 +0000 |
commit | 7a5248c70a4ad0ef1ff1b385a7674b38403386df (patch) | |
tree | 327e4acd06ba2ead6ee3f1bf972430cb250abdf0 /test/test_fcntl.rs | |
parent | 2e52ce8153154650dcf1d4ae8e7738b4f24a34e3 (diff) | |
parent | bacb85ecd958bbf4ca013d900dd33562e7102f56 (diff) | |
download | nix-7a5248c70a4ad0ef1ff1b385a7674b38403386df.zip |
Merge #1138
1138: Add Signal::as_str() to get representation as static string r=asomers a=MikailBag
# Motivation
Currently string representation of signal can be obtained with AsRef<str> impl.
But it has downside: returned string's lifetime is bound to lifetime of signal, so &str must be converted to String. This allocation is avoidable, because as_ref() only returns static strings. To fix this problem, my PR adds Signal::as_str() method, which returns static string.
Co-authored-by: Mikail Bagishov <bagishov.mikail@yandex.ru>
Diffstat (limited to 'test/test_fcntl.rs')
0 files changed, 0 insertions, 0 deletions