diff options
| author | John Kugelman <john@kugelman.name> | 2021-10-10 02:44:26 -0400 |
|---|---|---|
| committer | John Kugelman <john@kugelman.name> | 2021-10-10 02:44:26 -0400 |
| commit | 5b5c12be1cf2b2531a1cbf7097d2b5102cfaccd8 (patch) | |
| tree | d330f50e13e10c83c8ead1deca530a8e48496107 /library/std/src/ffi | |
| parent | 6928fafe06e4ab29317f75194e1bf67c119dccdc (diff) | |
Add #[must_use] to core and std constructors
Diffstat (limited to 'library/std/src/ffi')
| -rw-r--r-- | library/std/src/ffi/os_str.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs index c305519dd44..e4ad6cba880 100644 --- a/library/std/src/ffi/os_str.rs +++ b/library/std/src/ffi/os_str.rs @@ -119,6 +119,7 @@ impl OsString { /// let os_string = OsString::new(); /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[must_use] #[inline] pub fn new() -> OsString { OsString { inner: Buf::from_string(String::new()) } @@ -199,6 +200,7 @@ impl OsString { /// assert_eq!(capacity, os_string.capacity()); /// ``` #[stable(feature = "osstring_simple_functions", since = "1.9.0")] + #[must_use] #[inline] pub fn with_capacity(capacity: usize) -> OsString { OsString { inner: Buf::with_capacity(capacity) } |
