162 |
let mut command_name = Vec::with_capacity(command.len());
|
163 |
#[allow(clippy::uninit_vec)]
|
164 |
unsafe {
|
216 |
#[inline]
|
217 |
#[allow(clippy::uninit_vec)]
|
218 |
pub fn to_vec(&self) -> Vec<T> {
|
868 |
// but that's ok because we unwrap the result.
|
869 |
#[allow(clippy::uninit_vec)]
|
870 |
unsafe {
|
21 |
#[allow(clippy::uninit_vec)]
|
22 |
unsafe {
|
28 |
#[allow(clippy::uninit_vec)]
|
29 |
unsafe {
|
19 |
let mut data = Vec::with_capacity(cap);
|
20 |
#[allow(clippy::uninit_vec)]
|
21 |
unsafe {
|
152 |
// Reads `length` bytes at `offset` within `file`
|
153 |
#[allow(clippy::uninit_vec)]
|
154 |
#[allow(clippy::unused_io_amount)]
|
238 |
#[allow(clippy::uninit_vec)]
|
239 |
pub fn encrypt_data(&mut self, pt: Vec<u8>) -> Vec<u8> {
|
276 |
#[allow(clippy::uninit_vec)]
|
277 |
pub fn decrypt_data(&mut self, ct: Vec<u8>) -> Result<Vec<u8>, anyhow::Error> {
|
573 |
// finally set the new length once everything is initialized.
|
574 |
#[allow(clippy::uninit_vec)]
|
575 |
// this is a false positive, the lint doesn't currently special case set_len(0)
|
301 |
#[inline]
|
302 |
#[allow(clippy::uninit_vec)]
|
303 |
pub(crate) fn with_capacity(capacity: usize) -> Self {
|
339 |
/// Call this only with larger length values (won't make the buffer smaller)
|
340 |
#[allow(clippy::uninit_vec)]
|
341 |
pub(crate) unsafe fn ensure_capacity(&mut self, capacity: usize) {
|
363 |
// We write those bytes immediately after and dropping u8s does nothing
|
364 |
#[allow(clippy::uninit_vec)]
|
365 |
unsafe {
|
578 |
// We write those bytes immediately after and dropping u8s does nothing
|
579 |
#[allow(clippy::uninit_vec)]
|
580 |
unsafe {
|
13 |
#[allow(clippy::uninit_vec)]
|
14 |
unsafe {
|
33 |
#[allow(clippy::uninit_vec)]
|
34 |
unsafe {
|
53 |
#[allow(clippy::uninit_vec)]
|
54 |
unsafe {
|
73 |
#[allow(clippy::uninit_vec)]
|
74 |
unsafe {
|
93 |
#[allow(clippy::uninit_vec)]
|
94 |
unsafe {
|
618 |
}
|
619 |
#[allow(clippy::uninit_vec)] // we know what we're doing
|
620 |
#[inline]
|
1823 |
fn _apply_in_place(&self, base: &mut Vec<u8>, adaptive_end: bool) -> Result<(), ApplyError> {
|
1824 |
#[allow(clippy::uninit_vec)] // we know what we're doing
|
1825 |
fn copy_within_vec<T: Copy>(vec: &mut Vec<T>, range: Range<usize>, position: usize) {
|
1900 |
/// Returns [`ApplyError::RefOutOfBounds`] if a reference is out of bounds of the `base`.
|
1901 |
#[allow(clippy::uninit_vec)] // we know what we're doing
|
1902 |
pub fn revert(
|
7 |
pub static CLI_SNAPSHOT: Lazy<Box<[u8]>> = Lazy::new(
|
8 |
#[allow(clippy::uninit_vec)]
|
9 |
#[cold]
|
7 |
pub static RUNTIME_SNAPSHOT: Lazy<Box<[u8]>> = Lazy::new(
|
8 |
#[allow(clippy::uninit_vec)]
|
9 |
#[cold]
|
6 |
pub static CLI_SNAPSHOT: Lazy<Box<[u8]>> = Lazy::new(
|
7 |
#[allow(clippy::uninit_vec)]
|
8 |
#[cold]
|
30 |
static CLI_SNAPSHOT: Lazy<Box<[u8]>> = Lazy::new(
|
31 |
#[allow(clippy::uninit_vec)]
|
32 |
#[cold]
|
7 |
pub static CLI_SNAPSHOT: Lazy<Box<[u8]>> = Lazy::new(
|
8 |
#[allow(clippy::uninit_vec)]
|
9 |
#[cold]
|
7 |
pub static RUNTIME_SNAPSHOT: Lazy<Box<[u8]>> = Lazy::new(
|
8 |
#[allow(clippy::uninit_vec)]
|
9 |
#[cold]
|
558 |
#[allow(clippy::uninit_vec)]
|
559 |
// ... because we are filling it in on the next line and only reading the initialized members
|
20 |
#[allow(clippy::uninit_vec)]
|
21 |
#[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), feature = "simd"))]
|
132 |
// It's safe because read_exact() is called to fill all the allocated buffer.
|
133 |
#[allow(clippy::uninit_vec)]
|
134 |
unsafe {
|
70 |
impl<T> Gemino<T> {
|
71 |
#[allow(clippy::uninit_vec)]
|
72 |
pub(crate) fn new(buffer_size: usize) -> Result<Arc<Self>, ChannelError> {
|
362 |
#[inline]
|
363 |
#[allow(clippy::uninit_vec)]
|
364 |
fn to_f32_vec(&self) -> Vec<f32> {
|
375 |
#[inline]
|
376 |
#[allow(clippy::uninit_vec)]
|
377 |
fn to_f64_vec(&self) -> Vec<f64> {
|
460 |
#[inline]
|
461 |
#[allow(clippy::uninit_vec)]
|
462 |
fn to_f32_vec(&self) -> Vec<f32> {
|
473 |
#[inline]
|
474 |
#[allow(clippy::uninit_vec)]
|
475 |
fn to_f64_vec(&self) -> Vec<f64> {
|
135 |
#[allow(clippy::uninit_vec)]
|
136 |
fn from_f32_slice(slice: &[f32]) -> Self {
|
146 |
#[allow(clippy::uninit_vec)]
|
147 |
fn from_f64_slice(slice: &[f64]) -> Self {
|
179 |
#[allow(clippy::uninit_vec)]
|
180 |
fn from_f32_slice(slice: &[f32]) -> Self {
|
190 |
#[allow(clippy::uninit_vec)]
|
191 |
fn from_f64_slice(slice: &[f64]) -> Self {
|
108 |
/// Generates a random vector of bytes of length `len`.
|
109 |
#[allow(clippy::uninit_vec)]
|
110 |
#[inline]
|
198 |
#[allow(clippy::uninit_vec)]
|
199 |
/// Ensure we have enough front space to prepend the given byte count.
|
9 |
#[allow(clippy::uninit_vec)]
|
10 |
#[async_trait::async_trait]
|
78 |
#[allow(unsafe_code)]
|
79 |
#[allow(clippy::uninit_vec)]
|
80 |
unsafe {
|
139 |
let mut v = Vec::with_capacity(4);
|
140 |
#[allow(clippy::uninit_vec)]
|
141 |
unsafe {
|
152 |
let mut v = Vec::with_capacity(4);
|
153 |
#[allow(clippy::uninit_vec)]
|
154 |
unsafe {
|
329 |
let mut buf = Vec::with_capacity(builder.total_size());
|
330 |
#[allow(clippy::uninit_vec)]
|
331 |
unsafe {
|
766 |
let mut buffer = Vec::with_capacity(count);
|
767 |
#[allow(clippy::uninit_vec)]
|
768 |
buffer.set_len(count); // need to allocate every single location in vec before copying the buffer
|
816 |
let mut buffer = Vec::with_capacity(count);
|
817 |
#[allow(clippy::uninit_vec)]
|
818 |
buffer.set_len(count); // need to allocate every single location in vec before copying the buffer
|
773 |
#[allow(clippy::uninit_vec)]
|
774 |
unsafe {
|
1263 |
#[allow(clippy::uninit_vec)]
|
1264 |
unsafe {
|
1352 |
#[allow(clippy::uninit_vec)]
|
1353 |
unsafe {
|
1433 |
#[allow(clippy::uninit_vec)]
|
1434 |
unsafe {
|
1563 |
#[allow(clippy::uninit_vec)]
|
1564 |
unsafe {
|
22 |
#[allow(clippy::uninit_vec)]
|
23 |
unsafe {
|
130 |
// It's safe because read_exact() is called to fill all the allocated buffer.
|
131 |
#[allow(clippy::uninit_vec)]
|
132 |
unsafe {
|
636 |
since = "0.15.0")]
|
637 |
#[allow(clippy::uninit_vec)] // this is explicitly intended to create uninitialized memory
|
638 |
/// Create an array with uninitialized elements, shape `shape`.
|
481 |
#[allow(clippy::uninit_vec)]
|
482 |
unsafe fn get_process_data(
|
517 |
#[allow(clippy::uninit_vec)]
|
518 |
unsafe fn ph_query_process_variable_size(
|
28 |
// We allow uninitialized vectors because we don't want to allocate so much memory
|
29 |
#[allow(clippy::uninit_vec)]
|
30 |
unsafe {
|
292 |
// We allow uninitialized vectors because we don't want to allocate so much memory
|
293 |
#[allow(clippy::uninit_vec)]
|
294 |
unsafe {
|
46 |
#[inline]
|
47 |
#[allow(clippy::uninit_vec)]
|
48 |
pub(crate) fn create_sized_buffer<T>(capacity: usize) -> Vec<T> {
|
210 |
/// they are initialized.
|
211 |
#[allow(clippy::uninit_vec)]
|
212 |
unsafe fn vec_uninit<T: Sized>(n: usize) -> Vec<T> {
|
88 |
// Values will be filled next and there is only primitive data
|
89 |
#[allow(clippy::uninit_vec)]
|
90 |
unsafe {
|
305 |
unsafe {
|
306 |
#[allow(clippy::uninit_vec)]
|
307 |
vec.set_len(length);
|
192 |
#[allow(clippy::uninit_vec)]
|
193 |
#[inline]
|
85 |
#[inline]
|
86 |
#[allow(clippy::uninit_vec)]
|
87 |
fn rcv_bytes(&mut self, len: usize) -> Result<Vec<u8>> {
|
57 |
let mut buffer = SmallVec::with_capacity(len);
|
58 |
#[allow(clippy::uninit_vec)]
|
59 |
// SAFETY: we set length == capacity (see previous line),
|
42 |
let mut buffer = Vec::with_capacity(len);
|
43 |
#[allow(clippy::uninit_vec)]
|
44 |
// SAFETY: we set length == capacity (see previous line),
|
179 |
clippy::cast_ptr_alignment,
|
180 |
clippy::uninit_vec
|
181 |
)]
|
431 |
/// Will return `Err` if `s` is invalid JSON.
|
432 |
#[allow(clippy::uninit_vec)]
|
433 |
pub fn from_slice(input: &'de mut [u8]) -> Result<Self> {
|
187 |
clippy::cast_ptr_alignment,
|
188 |
clippy::uninit_vec
|
189 |
)]
|
243 |
clippy::cast_ptr_alignment,
|
244 |
clippy::uninit_vec
|
245 |
)]
|
109 |
unused_unsafe,
|
110 |
clippy::uninit_vec
|
111 |
)]
|
404 |
#[cfg_attr(not(feature = "no-inline"), inline(always))]
|
405 |
#[allow(clippy::uninit_vec)]
|
406 |
fn parse_array(&mut self, len: usize) -> Value<'de> {
|
343 |
#[cfg_attr(not(feature = "no-inline"), inline(always))]
|
344 |
#[allow(clippy::uninit_vec)]
|
345 |
fn parse_array(&mut self, len: usize) -> Value {
|
125 |
#[cfg_attr(not(feature = "no-inline"), inline(always))]
|
126 |
#[allow(clippy::uninit_vec)]
|
127 |
fn parse_array(&mut self, len: usize) -> Value {
|
35 |
#[inline(always)]
|
36 |
#[allow(clippy::uninit_vec)]
|
37 |
fn parse_array(&mut self, len: usize) -> OwnedValue {
|
89 |
#[inline(always)]
|
90 |
#[allow(clippy::uninit_vec)]
|
91 |
fn parse_array(&mut self, len: usize) -> BorrowedValue<'input> {
|
418 |
let le = val.to_le();
|
419 |
#[allow(clippy::uninit_vec)]
|
420 |
unsafe {
|
463 |
// reserve four bytes for the op batch
|
464 |
#[allow(clippy::uninit_vec)]
|
465 |
unsafe {
|
589 |
let old_len = to.len();
|
590 |
#[allow(clippy::uninit_vec)]
|
591 |
unsafe {
|
607 |
let mut new_vec: Vec<u8> = Vec::with_capacity(new_sz);
|
608 |
#[allow(clippy::uninit_vec)]
|
609 |
new_vec.set_len(new_sz);
|
60 |
#[allow(clippy::uninit_vec)]
|
61 |
pub fn uninit_new(len: usize) -> Data {
|
166 |
#[allow(clippy::uninit_vec)]
|
167 |
fn create_uninit_vec(num_bytes: usize) -> Vec<u8> {
|
7 |
#[inline]
|
8 |
#[allow(clippy::uninit_vec)]
|
9 |
pub fn compress(uncompressed: &[u8], compressed: &mut Vec<u8>) -> io::Result<()> {
|
27 |
#[inline]
|
28 |
#[allow(clippy::uninit_vec)]
|
29 |
pub fn decompress(compressed: &[u8], decompressed: &mut Vec<u8>) -> io::Result<()> {
|
630 |
#[allow(unknown_lints)]
|
631 |
#[allow(clippy::uninit_vec)]
|
632 |
pub(crate) fn get_proc_list() -> Option<Vec<Pid>> {
|
32 |
#[allow(clippy::cast_ptr_alignment)]
|
33 |
#[allow(clippy::uninit_vec)]
|
34 |
fn update_networks(&mut self) {
|
620 |
#[allow(clippy::uninit_vec)]
|
621 |
unsafe fn ph_query_process_variable_size(
|
698 |
#[allow(clippy::uninit_vec)]
|
699 |
unsafe fn get_process_data(
|
7 |
#[inline]
|
8 |
#[allow(clippy::uninit_vec)]
|
9 |
pub fn compress(uncompressed: &[u8], compressed: &mut Vec<u8>) -> io::Result<()> {
|
27 |
#[inline]
|
28 |
#[allow(clippy::uninit_vec)]
|
29 |
pub fn decompress(compressed: &[u8], decompressed: &mut Vec<u8>) -> io::Result<()> {
|
7 |
#[inline]
|
8 |
#[allow(clippy::uninit_vec)]
|
9 |
pub fn compress(uncompressed: &[u8], compressed: &mut Vec<u8>) -> io::Result<()> {
|
27 |
#[inline]
|
28 |
#[allow(clippy::uninit_vec)]
|
29 |
pub fn decompress(compressed: &[u8], decompressed: &mut Vec<u8>) -> io::Result<()> {
|
137 |
let mut bytes = Vec::with_capacity(len as usize);
|
138 |
#[allow(clippy::uninit_vec)]
|
139 |
bytes.set_len(len as usize);
|
105 |
#[inline(always)]
|
106 |
#[allow(clippy::unwrap_used, clippy::uninit_vec)]
|
107 |
fn parse_array(&mut self, len: usize) -> Value<'input> {
|
592 |
#[cfg_attr(not(feature = "no-inline"), inline(always))]
|
593 |
#[allow(clippy::uninit_vec)]
|
594 |
fn parse_array(&mut self, len: usize) -> Value<'de> {
|
63 |
#[allow(clippy::uninit_vec)]
|
64 |
unsafe {
|
87 |
#[allow(clippy::uninit_vec)]
|
88 |
unsafe {
|
111 |
#[allow(clippy::uninit_vec)]
|
112 |
unsafe {
|
756 |
#[inline(always)]
|
757 |
#[allow(clippy::uninit_vec)]
|
758 |
pub(crate) fn extend_from_slice(dst: &mut Vec<u8>, src: &[u8]) {
|
12 |
let mut v = Vec::with_capacity(len);
|
13 |
#[allow(clippy::uninit_vec)]
|
14 |
unsafe {
|
573 |
// finally set the new length once everything is initialized.
|
574 |
#[allow(clippy::uninit_vec)]
|
575 |
// this is a false positive, the lint doesn't currently special case set_len(0)
|
435 |
/// Using values from the returned vector before initializing them will lead to undefined behavior.
|
436 |
#[allow(clippy::uninit_vec)]
|
437 |
pub unsafe fn uninit_vector<T>(length: usize) -> Vec<T> {
|
109 |
let mut buffer = Vec::with_capacity(len);
|
110 |
#[allow(clippy::uninit_vec)]
|
111 |
unsafe {
|
243 |
let mut buffer = Vec::with_capacity(len);
|
244 |
#[allow(clippy::uninit_vec)]
|
245 |
unsafe {
|
111 |
// Safety: `u8` is a Copy type (no Drop), and a read_exact is about to occur, ensuring exact length
|
112 |
#[allow(clippy::uninit_vec)]
|
113 |
unsafe {
|
49 |
#[allow(clippy::uninit_vec)]
|
50 |
impl RequestBuffer for Vec<u8> {
|
17 |
#![allow(non_snake_case)]
|
18 |
#![allow(clippy::uninit_vec)]
|
1 |
#![allow(clippy::uninit_vec)]
|
1 |
#![allow(clippy::uninit_vec)]
|
1 |
#![allow(clippy::uninit_vec)]
|
1 |
// if the api fails, we don't return the uninitialized bytes
|
2 |
#![allow(clippy::uninit_vec)]
|
1 |
// if the api fails, we don't return the uninitialized bytes
|
2 |
#![allow(clippy::uninit_vec)]
|