Home
last modified time | relevance | path

Searched refs:saturating_sub (Results 1 – 25 of 50) sorted by relevance

12

/external/rust/crates/num-traits/src/ops/
Dsaturating.rs12 fn saturating_sub(self, v: Self) -> Self; in saturating_sub() method
24 fn saturating_sub(self, v: Self) -> Self {
25 Self::saturating_sub(self, v)
73 fn saturating_sub(&self, v: &Self) -> Self; in saturating_sub() method
76 saturating_impl!(SaturatingSub, saturating_sub, u8);
77 saturating_impl!(SaturatingSub, saturating_sub, u16);
78 saturating_impl!(SaturatingSub, saturating_sub, u32);
79 saturating_impl!(SaturatingSub, saturating_sub, u64);
80 saturating_impl!(SaturatingSub, saturating_sub, usize);
82 saturating_impl!(SaturatingSub, saturating_sub, u128);
[all …]
/external/rust/crates/serde_json/src/lexical/
Dexponent.rs31 exponent.saturating_sub(fraction_start).saturating_sub(1) in scientific_exponent()
46 exponent.saturating_sub(into_i32(fraction_digits - truncated)) in mantissa_exponent()
/external/crosvm/fuzz/
Dfs_server_fuzzer.rs36 .saturating_sub(data.len().try_into().unwrap())
37 .saturating_sub(0x100),
/external/rust/crates/tokio-stream/src/stream_ext/
Dskip.rs58 let lower = lower.saturating_sub(self.remaining); in size_hint()
59 let upper = upper.map(|x| x.saturating_sub(self.remaining)); in size_hint()
/external/rust/crates/futures-util/src/stream/stream/
Dskip.rs60 let lower = lower.saturating_sub(self.remaining as usize); in size_hint()
62 Some(x) => Some(x.saturating_sub(self.remaining as usize)), in size_hint()
/external/rust/crates/itertools/src/
Dsize_hint.rs37 low = low.saturating_sub(x); in sub_scalar()
38 hi = hi.map(|elt| elt.saturating_sub(x)); in sub_scalar()
Dpeek_nth.rs66 let unbuffered_items = (n + 1).saturating_sub(self.buf.len()); in peek_nth()
Dpad_tail.rs58 let tail = self.min.saturating_sub(self.pos); in size_hint()
/external/rust/crates/quiche/src/
Ddgram.rs81 self.queue_bytes_size = self.queue_bytes_size.saturating_sub(d.len()); in pop()
/external/rust/crates/bstr/src/
Dascii.rs304 i.saturating_sub(align), in negative_fallback_forward()
325 i.saturating_sub(align), in negative_sse2_forward()
Dutf8.rs515 let mut backup = rejected_at.saturating_sub(1); in validate()
633 return (None, cmp::max(1, i.saturating_sub(1))); in decode()
749 let limit = slice.len().saturating_sub(4); in decode_last()
/external/flatbuffers/rust/flatbuffers/src/
Dvector.rs216 self.remaining = self.remaining.saturating_sub(n); in nth()
247 self.remaining = self.remaining.saturating_sub(n); in nth_back()
/external/rust/crates/textwrap/src/
Dlib.rs888 .saturating_sub(core::display_width(options.initial_indent)); in wrap()
891 .saturating_sub(core::display_width(options.subsequent_indent)); in wrap()
1045 .saturating_sub(core::display_width(left_gap)) in wrap_columns()
1046 .saturating_sub(core::display_width(right_gap)) in wrap_columns()
1047 .saturating_sub(core::display_width(mid_gap) * (columns - 1)); in wrap_columns()
/external/crosvm/devices/src/
Dcmos.rs34 mem_below_4g.saturating_sub(16 * 1024 * 1024) / (64 * 1024), in new()
/external/rust/crates/rayon/src/iter/
Dintersperse.rs275 len + len.saturating_sub(1) + self.clone_first as usize + self.clone_last as usize in len()
310 let base_index = index + index.saturating_sub(!self.clone_first.get() as usize); in split_at()
/external/rust/crates/aho-corasick/src/
Dprefilter.rs677 cmp::max(at, pos.saturating_sub(self.offset.max as usize)) in next_candidate()
738 cmp::max(at, pos.saturating_sub(offset as usize)) in next_candidate()
778 cmp::max(at, pos.saturating_sub(offset as usize)) in next_candidate()
/external/rust/crates/thread_local/src/
Dthread_id.rs64 let bucket_size = 1 << bucket.saturating_sub(1); in new()
/external/crosvm/devices/src/virtio/fs/
Dread_dir.rs63 self.end.saturating_sub(self.current) in remaining()
/external/rust/crates/quiche/src/recovery/
Dmod.rs303 self.in_flight_count[epoch].saturating_sub(1); in on_ack_received()
429 self.bytes_in_flight = self.bytes_in_flight.saturating_sub(unacked_bytes); in on_pkt_num_space_discarded()
457 self.congestion_window.saturating_sub(self.bytes_in_flight) in cwnd_available()
638 self.in_flight_count[epoch].saturating_sub(1); in detect_lost_packets()
720 self.bytes_in_flight = self.bytes_in_flight.saturating_sub(lost_bytes); in on_packets_lost()
Dreno.rs55 r.bytes_in_flight = r.bytes_in_flight.saturating_sub(packet.size); in on_packet_acked()
/external/rust/crates/zip/src/
Dspec.rs56 let search_upper_bound = file_length.saturating_sub(HEADER_SIZE + ::std::u16::MAX as u64); in find_and_parse()
/external/crosvm/resources/src/
Daddress_allocator.rs191 slot.0.saturating_sub(range.1), in insert_at()
192 range.0.saturating_sub(slot.1), in insert_at()
/external/crosvm/rutabaga_gfx/src/
Drutabaga_2d.rs85 let offset_within_src = src_copyable_start_offset.saturating_sub(src_start_offset); in transfer_2d()
/external/rust/crates/regex/src/
Dutf8.rs129 while start > src.len().saturating_sub(4) { in decode_last_utf8()
/external/rust/crates/regex-syntax/src/
Derror.rs250 let note_len = span.end.column.saturating_sub(span.start.column); in notate_line()

12