Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 5 of 5) sorted by relevance

/rust/alloc/
Dslice.rs571 let mut buf = Vec::with_capacity(capacity); in repeat() localVariable
574 buf.extend(self); in repeat()
582 buf.as_ptr(), in repeat()
583 (buf.as_mut_ptr() as *mut T).add(buf.len()), in repeat()
584 buf.len(), in repeat()
587 let buf_len = buf.len(); in repeat()
588 buf.set_len(buf_len * 2); in repeat()
597 let rem_len = capacity - buf.len(); // `self.len() * rem` in repeat()
603 buf.as_ptr(), in repeat()
604 (buf.as_mut_ptr() as *mut T).add(buf.len()), in repeat()
[all …]
Dboxed.rs1276 let buf: Box<[u8]> = self.as_bytes().into(); in clone() localVariable
1277 unsafe { from_boxed_utf8_unchecked(buf) } in clone()
1437 let buf = RawVec::with_capacity(len); in from() localVariable
1439 ptr::copy_nonoverlapping(slice.as_ptr(), buf.ptr(), len); in from()
1440 buf.into_box(slice.len()).assume_init() in from()
/rust/alloc/vec/
Dmod.rs403 buf: RawVec<T, A>, field
427 Vec { buf: RawVec::NEW, len: 0 } in new()
568 Vec { buf: RawVec::new_in(alloc), len: 0 } in new_in()
617 Vec { buf: RawVec::with_capacity_in(capacity, alloc), len: 0 } in with_capacity_in()
693 unsafe { Vec { buf: RawVec::from_raw_parts_in(ptr, capacity, alloc), len: length } } in from_raw_parts_in()
794 self.buf.capacity() in capacity()
817 self.buf.reserve(self.len, additional); in reserve()
845 self.buf.reserve_exact(self.len, additional); in reserve_exact()
881 self.buf.try_reserve(self.len, additional) in try_reserve()
923 self.buf.try_reserve_exact(self.len, additional) in try_reserve_exact()
[all …]
Dinto_iter.rs36 pub(super) buf: NonNull<T>, field
119 self.buf = unsafe { NonNull::new_unchecked(RawVec::NEW.ptr()) }; in forget_allocation_drop_remaining()
120 self.ptr = self.buf.as_ptr(); in forget_allocation_drop_remaining()
121 self.end = self.buf.as_ptr(); in forget_allocation_drop_remaining()
328 let _ = RawVec::from_raw_parts_in(self.0.buf.as_ptr(), self.0.cap, alloc); in drop()
/rust/kernel/
Dprint.rs22 buf: *mut c_char, in rust_fmt_argument()
28 let mut w = unsafe { RawFormatter::from_ptrs(buf.cast(), end.cast()) }; in rust_fmt_argument()