Home
last modified time | relevance | path

Searched refs:checked_add (Results 1 – 25 of 34) sorted by relevance

12

/third_party/rust/crates/num-traits/src/ops/
Dchecked.rs8 fn checked_add(&self, v: &Self) -> Option<Self>; in checked_add() method
22 checked_impl!(CheckedAdd, checked_add, u8);
23 checked_impl!(CheckedAdd, checked_add, u16);
24 checked_impl!(CheckedAdd, checked_add, u32);
25 checked_impl!(CheckedAdd, checked_add, u64);
26 checked_impl!(CheckedAdd, checked_add, usize);
28 checked_impl!(CheckedAdd, checked_add, u128);
30 checked_impl!(CheckedAdd, checked_add, i8);
31 checked_impl!(CheckedAdd, checked_add, i16);
32 checked_impl!(CheckedAdd, checked_add, i32);
[all …]
/third_party/rust/crates/rust-openssl/openssl/src/
Dbase64.rs79 len = len.checked_add(4)?; in encoded_len()
82 len = len.checked_add(1)?; in encoded_len()
91 len = len.checked_add(3)?; in decoded_len()
Dbn.rs276 pub fn checked_add(&mut self, a: &BigNumRef, b: &BigNumRef) -> Result<(), ErrorStack> { in checked_add() method
1247 r.checked_add(self, oth).unwrap(); in add()
/third_party/rust/crates/rustix/src/backend/linux_raw/
Dvdso.rs106 vdso.load_end = vdso.base_plus(phdr.p_offset.checked_add(phdr.p_memsz)?)?; in init_from_sysinfo_ehdr()
174 i = i.checked_add(1)?; in init_from_sysinfo_ehdr()
301 let _ = (self.load_addr as usize).checked_add(offset)?; in base_plus()
/third_party/rust/crates/os_str_bytes/src/windows/wtf8/
Dconvert.rs98 .and_then(|x| x.checked_add(shifts)), in size_hint()
172 high.and_then(|x| x.checked_add(additional)), in size_hint()
/third_party/rust/crates/rustix/src/
Dutils.rs21 .checked_add(core::mem::size_of::<T>()) in check_raw_pointer()
/third_party/rust/crates/regex/regex-syntax/src/hir/
Dinterval.rs487 self.checked_add(1).unwrap() in increment()
508 c => char::from_u32((c as u32).checked_add(1).unwrap()).unwrap(), in increment()
/third_party/rust/crates/humantime/src/
Dduration.rs93 self.checked_add(other).ok_or(Error::NumberOverflow) in add()
164 .and_then(|x| x.checked_add(c as u64 - '0' as u64)) in parse()
/third_party/rust/crates/minimal-lexical/etc/correctness/rng-tests/
D_common.rs25 return value.checked_mul(10)?.checked_add(digit as i32); in add_digit_i32()
/third_party/rust/crates/minimal-lexical/examples/
Dsimple.rs67 return value.checked_mul(10)?.checked_add(digit as i32); in add_digit_i32()
/third_party/rust/crates/aho-corasick/src/
Dclasses.rs186 class = class.checked_add(1).unwrap(); in build()
/third_party/rust/crates/minimal-lexical/etc/correctness/test-parse-random/
D_common.rs39 return value.checked_mul(10)?.checked_add(digit as i32); in add_digit_i32()
/third_party/rust/crates/minimal-lexical/src/
Dparse.rs200 value.checked_mul(10)?.checked_add(digit as u64) in add_digit()
/third_party/rust/crates/minimal-lexical/fuzz/fuzz_targets/
Dparse.rs20 return value.checked_mul(10)?.checked_add(digit as i32); in add_digit_i32()
/third_party/rust/crates/cxx/src/
Dcxx_string.rs194 .checked_add(additional) in reserve()
/third_party/qrcodegen/rust/examples/
Dqrcodegen-demo.rs174 let dimension = qr.size().checked_add(border.checked_mul(2).unwrap()).unwrap(); in to_svg_string()
/third_party/rust/crates/minimal-lexical/etc/correctness/test-parse-golang/
Dmain.rs32 return value.checked_mul(10)?.checked_add(digit as i32); in add_digit_i32()
/third_party/rust/crates/minimal-lexical/tests/
Dintegration_tests.rs20 return value.checked_mul(10)?.checked_add(digit as i32); in add_digit_i32()
/third_party/rust/crates/minimal-lexical/etc/correctness/test-parse-unittests/
Dmain.rs39 return value.checked_mul(10)?.checked_add(digit as i32); in add_digit_i32()
/third_party/qrcodegen/rust-no-heap/src/
Dlib.rs1233 .and_then(|x| x.checked_add(denom - 1)) in calc_bit_length()
1263 result = result.checked_add(4 + usize::from(ccbits))?; in get_total_bits()
1264 result = result.checked_add(seg.bitlength)?; in get_total_bits()
/third_party/rust/crates/cxx/syntax/
Ddiscriminant.rs196 Sign::Positive => match self.magnitude.checked_add(1) { in checked_succ()
/third_party/qrcodegen/rust-no-heap/examples/
Dqrcodegen-demo.rs235 let dimension = qr.size().checked_add(border.checked_mul(2).unwrap()).unwrap(); in to_svg_string()
/third_party/qrcodegen/rust/src/
Dlib.rs1122 result = result.checked_add(4 + usize::from(ccbits))?; in get_total_bits()
1123 result = result.checked_add(seg.data.len())?; in get_total_bits()
/third_party/rust/crates/nom/src/character/
Dcomplete.rs756 … Some(d) => match value.checked_mul(10).and_then(|v| v.checked_add(d as $t)) {
816 … Some(d) => match value.checked_mul(10).and_then(|v| v.checked_add(d as $t)) {
Dstreaming.rs662 … Some(d) => match value.checked_mul(10).and_then(|v| v.checked_add(d as $t)) {
722 … Some(d) => match value.checked_mul(10).and_then(|v| v.checked_add(d as $t)) {

12