Home
last modified time | relevance | path

Searched refs:as_slice (Results 1 – 25 of 138) sorted by relevance

123456

/external/rust/crates/flate2/tests/
Dempty-read.rs12 let mut decoder = flate2::read::DeflateDecoder::new(encoded.as_slice()); in deflate_decoder_empty_read()
16 assert_eq!(decoded.as_slice(), original); in deflate_decoder_empty_read()
26 let mut decoder = flate2::read::DeflateDecoder::new(encoded.as_slice()); in deflate_encoder_empty_read()
29 assert_eq!(decoded.as_slice(), original); in deflate_encoder_empty_read()
38 let mut decoder = flate2::read::GzDecoder::new(encoded.as_slice()); in gzip_decoder_empty_read()
42 assert_eq!(decoded.as_slice(), original); in gzip_decoder_empty_read()
52 let mut decoder = flate2::read::GzDecoder::new(encoded.as_slice()); in gzip_encoder_empty_read()
55 assert_eq!(decoded.as_slice(), original); in gzip_encoder_empty_read()
64 let mut decoder = flate2::read::ZlibDecoder::new(encoded.as_slice()); in zlib_decoder_empty_read()
68 assert_eq!(decoded.as_slice(), original); in zlib_decoder_empty_read()
[all …]
/external/crosvm/acpi_tables/src/
Dsdt.rs66 let checksum = super::generate_checksum(data.as_slice()); in from_file()
80 let checksum = super::generate_checksum(self.data.as_slice()); in update_checksum()
84 pub fn as_slice(&self) -> &[u8] { in as_slice() method
85 &self.data.as_slice() in as_slice()
89 self.data.extend_from_slice(value.as_slice()); in append()
105 self.data[offset..offset + value_len].copy_from_slice(&value.as_slice()); in write()
124 .as_slice() in test_sdt()
130 .as_slice() in test_sdt()
144 writer.write_all(&expected_sdt.as_slice())?; in test_sdt_read_write()
150 assert_eq!(actual_sdt.as_slice(), expected_sdt.as_slice()); in test_sdt_read_write()
Drsdp.rs38 rsdp.checksum = super::generate_checksum(&rsdp.as_slice()[0..19]);
39 rsdp.extended_checksum = super::generate_checksum(&rsdp.as_slice());
57 .as_slice() in test_rsdp()
62 .as_slice() in test_rsdp()
/external/rust/crates/grpcio/src/
Dbuf.rs34 pub fn as_slice(&self) -> &[u8] { in as_slice() method
122 self.as_slice().fmt(f) in fmt()
141 self.as_slice() == r in eq()
394 Ok(unsafe { self.slice.as_slice().get_unchecked(self.offset..) }) in fill_buf()
440 unsafe { self.slice.as_slice().get_unchecked(self.offset..) } in chunk()
454 let buf = GrpcByteBuffer::from(data.as_slice()); in new_message_reader()
463 assert!(empty.as_slice().is_empty()); in test_grpc_slice()
467 assert_eq!(a.as_slice(), slice.as_slice()); in test_grpc_slice()
473 assert_eq!(a.as_slice(), slice.as_slice()); in test_grpc_slice()
495 assert_eq!(data[..half_size], *buf.as_slice()); in test_typo_len_offset()
[all …]
/external/rust/crates/bstr/src/
Dcow.rs26 self.as_slice() in deref()
44 pub fn as_slice(&self) -> &[u8] { in as_slice() method
45 self.0.as_slice() in as_slice()
73 pub fn as_slice(&self) -> &[u8] { in as_slice() method
81 pub fn as_slice(&self) -> &[u8] { in as_slice() method
/external/rust/crates/bytes/src/
Dbytes.rs495 fn as_slice(&self) -> &[u8] { in as_slice() method
534 self.as_slice() in chunk()
567 self.as_slice() in deref()
574 self.as_slice() in as_ref()
583 self.as_slice().hash(state); in hash()
589 self.as_slice() in borrow()
607 self.as_slice().into_iter() in into_iter()
621 self.as_slice() == other.as_slice() in eq()
627 self.as_slice().partial_cmp(other.as_slice()) in partial_cmp()
633 self.as_slice().cmp(other.as_slice()) in cmp()
[all …]
Dbytes_mut.rs760 fn as_slice(&self) -> &[u8] { in as_slice() method
948 self.as_slice() in chunk()
1018 self.as_slice() in as_ref()
1065 self.as_slice() == other.as_slice() in eq()
1071 self.as_slice().partial_cmp(other.as_slice()) in partial_cmp()
1077 self.as_slice().cmp(other.as_slice()) in cmp()
/external/crosvm/x86_64/src/
Dacpi.rs86 dsdt.append_slice(amls.as_slice()); in create_dsdt_table()
116 guest_mem.write_at_addr(sdt.as_slice(), offset).ok()?; in create_acpi_tables()
131 guest_mem.write_at_addr(dsdt.as_slice(), offset).ok()?; in create_acpi_tables()
183 guest_mem.write_at_addr(facp.as_slice(), offset).ok()?; in create_acpi_tables()
219 guest_mem.write_at_addr(madt.as_slice(), offset).ok()?; in create_acpi_tables()
236 guest_mem.write_at_addr(xsdt.as_slice(), offset).ok()?; in create_acpi_tables()
240 guest_mem.write_at_addr(rsdp.as_slice(), rsdp_offset).ok()?; in create_acpi_tables()
/external/rust/crates/tinyvec/src/
Darrayvec.rs118 &self.data.as_slice()[..self.len as usize] in deref()
266 self.data.as_slice().as_ptr() in as_ptr()
272 pub fn as_slice(&self) -> &[A::Item] { in as_slice() method
286 self.data.as_slice().len() in capacity()
974 &self.data.as_slice()[self.len as usize..] in grab_spare_slice()
1185 .as_slice() in from()
1216 pub fn as_slice(&self) -> &[A::Item] { in as_slice() method
1217 &self.data.as_slice()[self.base as usize..self.tail as usize] in as_slice()
1297 f.debug_tuple("ArrayVecIterator").field(&self.as_slice()).finish() in fmt()
1338 self.as_slice().eq(other.as_slice()) in eq()
[all …]
Dslicevec.rs112 pub fn as_slice(&self) -> &[T] { in as_slice() method
808 self.as_slice().eq(other.as_slice()) in eq()
820 self.as_slice().partial_cmp(other.as_slice()) in partial_cmp()
830 self.as_slice().cmp(other.as_slice()) in cmp()
841 self.as_slice().eq(*other) in eq()
851 self.as_slice().hash(state) in hash()
Dtinyvec.rs487 pub fn as_slice(self: &Self) -> &[A::Item] { in as_slice() method
1172 pub fn as_slice(self: &Self) -> &[A::Item];
1208 f.debug_tuple("TinyVecIterator").field(&self.as_slice()).finish() in fmt()
1252 self.as_slice().eq(other.as_slice()) in eq()
1264 self.as_slice().partial_cmp(other.as_slice()) in partial_cmp()
1274 self.as_slice().cmp(other.as_slice()) in cmp()
1285 self.as_slice().eq(other.as_slice()) in eq()
1296 self.as_slice().eq(*other) in eq()
1306 self.as_slice().hash(state) in hash()
Darray.rs30 fn as_slice(&self) -> &[Self::Item]; in as_slice() method
/external/rust/crates/regex/src/literal/
Dimp.rs209 if BoyerMooreSearch::should_use(lit.as_slice()) { in new()
576 let (g, gi) = Self::select_guard(pattern.as_slice()); in new()
577 let skip_table = Self::compile_skip_table(pattern.as_slice()); in new()
578 let md2_shift = Self::compile_md2_shift(pattern.as_slice()); in new()
910 let offset = searcher.find(haystack.as_slice()).unwrap(); in bm_skip_reset_bug()
920 let offset = searcher.find(haystack.as_slice()).unwrap(); in bm_backstop_underflow_bug()
947 assert_eq!(needle_start, searcher.find(haystack.as_slice()).unwrap()); in bm_memchr_fallback_indexing_bug()
975 let haystack = haystack_raw.as_slice(); in bm_win_gnu_indexing_bug()
1007 (pile1, pile2.as_slice())
1009 (pile2, pile1.as_slice())
[all …]
/external/rust/crates/nix/test/
Dtest_sendfile.rs65 Some(headers.as_slice()), in test_sendfile_freebsd()
66 Some(trailers.as_slice()), in test_sendfile_freebsd()
112 Some(headers.as_slice()), in test_sendfile_darwin()
113 Some(trailers.as_slice()), in test_sendfile_darwin()
/external/rust/crates/regex-syntax/src/
Dutf8.rs139 pub fn as_slice(&self) -> &[Utf8Range] { in as_slice() method
153 self.as_slice().len() in len()
201 self.as_slice().into_iter() in into_iter()
545 assert_eq!(s.as_slice(), &[rutf8(0xA, 0xB)]); in reverse()
549 assert_eq!(s.as_slice(), &[rutf8(0xB, 0xC), rutf8(0xA, 0xB)]); in reverse()
554 s.as_slice(), in reverse()
566 s.as_slice(), in reverse()
/external/crosvm/gpu_display/src/
Devent_device.rs109 let bytes = event.as_slice(); in send_report()
114 .extend(virtio_input_event::syn().as_slice().iter()); in send_report()
126 let bytes = event.as_slice(); in send_event_encoded()
/external/rust/crates/csv/src/
Dstring_record.rs200 StringRecord::with_capacity(record.as_slice().len(), record.len()); in from_byte_record_lossy()
435 StringRecord::with_capacity(self.as_slice().len(), self.len()); in trim()
556 pub fn as_slice(&self) -> &str { in as_slice() method
557 debug_assert!(str::from_utf8(self.0.as_slice()).is_ok()); in as_slice()
561 unsafe { str::from_utf8_unchecked(self.0.as_slice()) } in as_slice()
806 assert_eq!(rec.as_slice().len(), 0); in trim_does_not_panic_on_empty_records_3()
/external/crosvm/src/plugin/
Dvcpu.rs90 VcpuRequest_StateSet::REGS => VcpuRegs(vcpu.get_regs()?).as_slice().to_vec(), in get_vcpu_state()
91 VcpuRequest_StateSet::SREGS => VcpuSregs(vcpu.get_sregs()?).as_slice().to_vec(), in get_vcpu_state()
92 VcpuRequest_StateSet::FPU => VcpuFpu(vcpu.get_fpu()?).as_slice().to_vec(), in get_vcpu_state()
93 VcpuRequest_StateSet::DEBUGREGS => VcpuDebugregs(vcpu.get_debugregs()?).as_slice().to_vec(), in get_vcpu_state()
94 VcpuRequest_StateSet::XCREGS => VcpuXcregs(vcpu.get_xcrs()?).as_slice().to_vec(), in get_vcpu_state()
95 VcpuRequest_StateSet::LAPIC => VcpuLapicState(vcpu.get_lapic()?).as_slice().to_vec(), in get_vcpu_state()
96 VcpuRequest_StateSet::MP => VcpuMpState(vcpu.get_mp_state()?).as_slice().to_vec(), in get_vcpu_state()
97 VcpuRequest_StateSet::EVENTS => VcpuEvents(vcpu.get_vcpu_events()?).as_slice().to_vec(), in get_vcpu_state()
328 fn as_slice(&self) -> &[u8] { in as_slice() method
435 io.data = data.as_slice().to_vec(); in process()
[all …]
/external/rust/crates/tokio/tests/
Dio_read_to_string.rs25 match AsyncReadExt::read_to_string(&mut data.as_slice(), &mut s).await { in to_string_does_not_truncate_on_utf8_error()
57 let len = AsyncReadExt::read_to_string(&mut data.as_slice(), &mut s) in to_string_appends()
/external/adhd/cras/client/libcras/src/
Dcras_server_socket.rs67 0 => self.socket.send(message.as_slice()), in send_server_message_with_fds()
69 let ioslice = io::IoSlice::new(message.as_slice()); in send_server_message_with_fds()
/external/rust/crates/rusqlite/src/util/
Dsmall_cstr.rs151 SmallCString::new("��").unwrap().0.as_slice(), in test_small_cstring()
162 assert_eq!(SmallCString::new("").unwrap().0.as_slice(), b"\0"); in test_small_cstring()
/external/crosvm/devices/src/virtio/input/
Devent_source.rs110 evt.as_slice() in send_event()
112 EventType::VirtioInputEvent => vio_evt.as_slice(), in send_event()
258 for byte in evt.as_slice() { in new()
/external/rust/crates/tinyvec/src/array/
Dconst_generic_impl.rs9 fn as_slice(&self) -> &[T] { in as_slice() method
/external/rust/crates/tinyvec/
Dgen-array-impls.sh12 fn as_slice(&self) -> &[T] {
/external/rust/crates/ryu/benches/
Dbench.rs40 black_box(buf.as_slice());

123456