Home
last modified time | relevance | path

Searched refs:with_capacity (Results 1 – 25 of 262) sorted by relevance

1234567891011

/external/rust/crates/bytes/benches/
Dbytes_mut.rs13 test::black_box(BytesMut::with_capacity(12)); in alloc_small()
21 test::black_box(BytesMut::with_capacity(128)); in alloc_mid()
28 test::black_box(BytesMut::with_capacity(4096)); in alloc_big()
34 let mut buf = BytesMut::with_capacity(4096); in deref_unique()
46 let mut buf = BytesMut::with_capacity(4096); in deref_unique_unroll()
65 let mut buf = BytesMut::with_capacity(4096); in deref_shared()
78 let mut buf1 = BytesMut::with_capacity(8); in deref_two()
81 let mut buf2 = BytesMut::with_capacity(4096); in deref_two()
108 let mut buf = BytesMut::with_capacity(128); in alloc_write_split_to_mid()
119 let mut buf = BytesMut::with_capacity(1024); in drain_write_drain()
[all …]
/external/rust/crates/bytes/tests/
Dtest_bytes.rs85 let mut a = BytesMut::with_capacity(64); in fmt_write()
89 let mut b = BytesMut::with_capacity(64); in fmt_write()
94 let mut c = BytesMut::with_capacity(64); in fmt_write()
181 let mut bytes = BytesMut::with_capacity(1024); in split_off_uninitialized()
286 let mut bytes = BytesMut::with_capacity(1024); in split_to_uninitialized()
293 let mut bytes = BytesMut::with_capacity(100); in split_off_to_at_gt_len()
441 let mut bytes = BytesMut::with_capacity(64); in reserve_growth()
451 let mut bytes = BytesMut::with_capacity(1024); in reserve_allocates_at_least_original_capacity()
468 let mut bytes = BytesMut::with_capacity(SIZE); in reserve_max_original_capacity_value()
482 let mut bytes = BytesMut::with_capacity(16); in reserve_vec_recycling()
[all …]
Dtest_buf_mut.rs10 let mut buf = Vec::with_capacity(64); in test_vec_as_mut_buf()
32 let mut buf = Vec::with_capacity(8); in test_put_u8()
39 let mut buf = Vec::with_capacity(8); in test_put_u16()
52 let mut buf = Vec::with_capacity(8); in test_vec_advance_mut()
60 let mut buf = BytesMut::with_capacity(100); in test_clone()
/external/rust/crates/criterion/src/stats/
Dtuple.rs59 (Vec::with_capacity(size),) in new()
99 (Vec::with_capacity(size), Vec::with_capacity(size)) in new()
148 Vec::with_capacity(size), in new()
149 Vec::with_capacity(size), in new()
150 Vec::with_capacity(size), in new()
217 Vec::with_capacity(size), in new()
218 Vec::with_capacity(size), in new()
219 Vec::with_capacity(size), in new()
220 Vec::with_capacity(size), in new()
/external/rust/crates/slab/tests/
Dslab.rs24 let mut slab = Slab::with_capacity(10); in insert_get_many()
43 let mut slab = Slab::with_capacity(10); in insert_get_remove_many()
65 let mut slab = Slab::with_capacity(1); in insert_with_vacant_entry()
79 let mut slab = Slab::<usize>::with_capacity(1); in get_vacant_entry_without_using()
87 let slab = Slab::<usize>::with_capacity(1); in invalid_get_panics()
94 let mut slab = Slab::<usize>::with_capacity(1); in double_remove_panics()
103 let mut slab = Slab::<usize>::with_capacity(1); in invalid_remove_panics()
121 let mut slab = Slab::with_capacity(10); in reserve_does_not_allocate_if_available()
140 let mut slab = Slab::with_capacity(10); in reserve_exact_does_not_allocate_if_available()
159 let mut slab = Slab::with_capacity(2); in retain()
/external/rust/crates/itoa/benches/
Dbench.rs23 let mut buf = Vec::with_capacity(40);
41 let mut buf = String::with_capacity(40);
59 let mut buf = Vec::with_capacity(40);
/external/rust/crates/half/src/
Dvec.rs143 let mut vec = Vec::with_capacity(slice.len()); in from_f32_slice()
153 let mut vec = Vec::with_capacity(slice.len()); in from_f64_slice()
185 let mut vec = Vec::with_capacity(slice.len()); in from_f32_slice()
195 let mut vec = Vec::with_capacity(slice.len()); in from_f64_slice()
/external/rust/crates/textwrap/src/core/
Doptimal_fit.rs12 let mut line_numbers = Vec::with_capacity(size); in new()
160 let mut widths = Vec::with_capacity(fragments.len() + 1); in wrap_optimal_fit()
215 let mut lines = Vec::with_capacity(line_numbers.get(fragments.len(), &minima)); in wrap_optimal_fit()
/external/rust/crates/futures/tests/
Dio_buf_writer.rs65 let mut writer = BufWriter::with_capacity(2, Vec::new()); in buf_writer()
110 let mut w = BufWriter::with_capacity(3, Vec::new()); in buf_writer_inner_flushes()
125 let mut w = BufWriter::with_capacity(3, Cursor::new(vec![0; 8])); in buf_writer_seek()
143 let mut writer = BufWriter::with_capacity(2, MaybePending::new(Vec::new())); in maybe_pending_buf_writer()
190 let mut w = BufWriter::with_capacity(3, MaybePending::new(Vec::new())); in maybe_pending_buf_writer_inner_flushes()
259 let mut w = BufWriter::with_capacity(3, MaybePendingSeek::new(vec![0; 8])); in maybe_pending_buf_writer_seek()
Dio_buf_reader.rs91 let mut reader = BufReader::with_capacity(2, inner); in test_buffered_reader()
133 let mut reader = BufReader::with_capacity(2, Cursor::new(inner)); in test_buffered_reader_seek()
182 let mut reader = BufReader::with_capacity(5, AllowStdIo::new(PositionReader { pos: 0 })); in test_buffered_reader_seek_underflow()
235 let mut reader = BufReader::with_capacity(2, MaybePending::new(inner)); in maybe_pending()
276 let mut reader = BufReader::with_capacity(2, inner); in maybe_pending_buf_read()
348 let mut reader = BufReader::with_capacity(2, MaybePendingSeek::new(inner)); in maybe_pending_seek()
/external/rust/crates/futures-util/src/stream/stream/
Dready_chunks.rs29 items: Vec::with_capacity(capacity), in new()
54 Poll::Ready(Some(mem::replace(this.items, Vec::with_capacity(*this.cap)))) in poll_next()
64 … return Poll::Ready(Some(mem::replace(this.items, Vec::with_capacity(*this.cap)))) in poll_next()
/external/rust/crates/weak-table/tests/
Dweak_key_hash_map.rs17 let mut tester = Tester::with_capacity(4); in test_script()
57 Tester::with_capacity(8) in new()
60 pub fn with_capacity(capacity: usize) -> Self { in with_capacity() function
62 weak: WeakKeyHashMap::with_capacity(capacity), in with_capacity()
/external/rust/crates/grpcio/src/
Dmetadata.rs59 MetadataBuilder::with_capacity(0) in new()
63 pub fn with_capacity(cap: usize) -> MetadataBuilder { in with_capacity() method
65 arr: Metadata::with_capacity(cap), in with_capacity()
144 fn with_capacity(cap: usize) -> Metadata { in with_capacity() method
221 let mut builder = MetadataBuilder::with_capacity(self.len()); in clone()
/external/rust/crates/tokio/src/io/util/
Dbuf_stream.rs39 pub fn with_capacity( in with_capacity() method
45 inner: BufReader::with_capacity( in with_capacity()
47 BufWriter::with_capacity(writer_capacity, stream), in with_capacity()
Dbuf_writer.rs44 Self::with_capacity(DEFAULT_BUF_SIZE, inner) in new()
48 pub fn with_capacity(cap: usize, inner: W) -> Self { in with_capacity() method
51 buf: Vec::with_capacity(cap), in with_capacity()
/external/rust/crates/tinytemplate/benches/
Dbenchmarks.rs22 let mut table = Vec::with_capacity(size); in make_table_context()
24 let mut inner = Vec::with_capacity(size); in make_table_context()
/external/rust/crates/ring/src/io/
Dwriter.rs53 pub(super) fn with_capacity(capacity: LengthMeasurement) -> Self { in with_capacity() method
55 bytes: Vec::with_capacity(capacity.len), in with_capacity()
/external/vm_tools/p9/src/protocol/
Dwire_format.rs89 let mut result = String::with_capacity(len as usize); in decode()
120 let mut result = Vec::with_capacity(len as usize); in decode()
185 let mut buf = Vec::with_capacity(len as usize); in decode()
306 let mut buf = Vec::with_capacity(len + mem::size_of::<u16>()); in string_encode()
411 Vec::with_capacity(values.len() * mem::size_of::<u32>() + mem::size_of::<u16>()); in vector_encode()
443 Vec::with_capacity(expected.len() * mem::size_of::<u32>() + mem::size_of::<u16>()); in vector_decode()
466 Vec::with_capacity(values.len() * mem::size_of::<u8>() + mem::size_of::<u32>()); in data_encode()
484 Vec::with_capacity(expected.len() * mem::size_of::<u8>() + mem::size_of::<u32>()); in data_decode()
501 let mut long_str = String::with_capacity(std::u16::MAX as usize); in error_cases()
515 let mut long_vec: Vec<u32> = Vec::with_capacity(std::u16::MAX as usize); in error_cases()
/external/rust/crates/futures-util/src/io/
Dbuf_writer.rs44 Self::with_capacity(DEFAULT_BUF_SIZE, inner) in new()
48 pub fn with_capacity(cap: usize, inner: W) -> Self { in with_capacity() method
51 buf: Vec::with_capacity(cap), in with_capacity()
Dbuf_reader.rs45 Self::with_capacity(DEFAULT_BUF_SIZE, inner) in new()
49 pub fn with_capacity(capacity: usize, inner: R) -> Self { in with_capacity() method
51 let mut buffer = Vec::with_capacity(capacity); in with_capacity()
/external/rust/crates/regex/examples/
Dshootout-regex-dna-single-cheat.rs19 let mut seq = String::with_capacity(50 * (1 << 20)); in main()
68 let mut new = String::with_capacity(text.len()); in replace_all()
Dshootout-regex-dna-cheat.rs26 let mut seq = String::with_capacity(50 * (1 << 20)); in main()
83 let mut new = String::with_capacity(text.len()); in replace_all()
/external/rust/crates/rand/src/seq/
Dindex.rs352 let mut candidates = Vec::with_capacity(length.as_usize()); in sample_efraimidis_spirakis()
373 let mut result: Vec<N> = Vec::with_capacity(amount.as_usize()); in sample_efraimidis_spirakis()
387 let mut candidates = BinaryHeap::with_capacity(length.as_usize()); in sample_efraimidis_spirakis()
401 let mut result: Vec<N> = Vec::with_capacity(amount.as_usize()); in sample_efraimidis_spirakis()
423 let mut indices = Vec::with_capacity(amount as usize); in sample_floyd()
462 let mut indices: Vec<u32> = Vec::with_capacity(length as usize); in sample_inplace()
528 let mut cache = HashSet::with_capacity(amount.as_usize()); in sample_rejection()
532 let mut indices = Vec::with_capacity(amount.as_usize()); in sample_rejection()
/external/rust/crates/criterion/src/stats/bivariate/
Dresamples.rs34 let mut stage = (Vec::with_capacity(n), Vec::with_capacity(n)); in next()
/external/rust/crates/mio/src/event/
Devents.rs92 pub fn with_capacity(capacity: usize) -> Events { in with_capacity() method
94 inner: sys::Events::with_capacity(capacity), in with_capacity()

1234567891011