Method
try_append
(
&mut self, other: &'other mut Self,
)
Source from the content-addressed store, hash-verified
| 330 | /// ``` |
| 331 | #[inline] |
| 332 | pub fn try_append<'other>( |
| 333 | &mut self, other: &'other mut Self, |
| 334 | ) -> Option<&'other mut Self> { |
| 335 | let new_len = self.len() + other.len(); |
| 336 | if new_len > A::CAPACITY { |
| 337 | return Some(other); |
| 338 | } |
| 339 | |
| 340 | let iter = other.iter_mut().map(core::mem::take); |
| 341 | for item in iter { |
| 342 | self.push(item); |
| 343 | } |
| 344 | |
| 345 | other.set_len(0); |
| 346 | |
| 347 | return None; |
| 348 | } |
| 349 | |
| 350 | /// A `*mut` pointer to the backing array. |
| 351 | /// |
Callers
nothing calls this directly
Tested by
no test coverage detected