Home
last modified time | relevance | path

Searched refs:checked_sub (Results 1 – 25 of 63) sorted by relevance

123

/external/rust/crates/num-traits/src/ops/
Dchecked.rs42 fn checked_sub(&self, v: &Self) -> Option<Self>; in checked_sub() method
45 checked_impl!(CheckedSub, checked_sub, u8);
46 checked_impl!(CheckedSub, checked_sub, u16);
47 checked_impl!(CheckedSub, checked_sub, u32);
48 checked_impl!(CheckedSub, checked_sub, u64);
49 checked_impl!(CheckedSub, checked_sub, usize);
51 checked_impl!(CheckedSub, checked_sub, u128);
53 checked_impl!(CheckedSub, checked_sub, i8);
54 checked_impl!(CheckedSub, checked_sub, i16);
55 checked_impl!(CheckedSub, checked_sub, i32);
[all …]
/external/crosvm/sys_util/src/
Dclock.rs32 pub fn checked_sub(&self, duration: Duration) -> Option<Self> { in checked_sub() method
33 Some(Clock(self.0.checked_sub(duration)?)) in checked_sub()
84 pub fn checked_sub(&self, duration: Duration) -> Option<Self> { in checked_sub() method
88 .checked_sub(duration.as_nanos() as u64)?, in checked_sub()
Dwrite_zeroes.rs41 .checked_sub(bytes_written) in write_zeroes_all()
71 .checked_sub(bytes_written) in write_zeroes_all_at()
Dmmap.rs473 match self.size.checked_sub(offset) { in write_slice()
505 match self.size.checked_sub(offset) { in read_slice()
621 match count.checked_sub(bytes_read) { in read_to_memory()
680 match count.checked_sub(bytes_written) { in write_from_memory()
/external/rust/crates/instant/tests/
Dwasm.rs45 assert!(now.checked_sub(Duration::from_millis(1)).is_some()); in test_checked_sub()
47 .checked_sub(Duration::new(u64::MAX, ONE_BILLION - 1)) in test_checked_sub()
/external/rust/crates/quiche/src/h3/qpack/
Ddecoder.rs124 .checked_sub((name.len() + value.len()) as u64) in decode()
164 .checked_sub((name.len() + value.len()) as u64) in decode()
195 .checked_sub((name.len() + value.len()) as u64) in decode()
/external/crosvm/vm_memory/src/
Dguest_address.rs48 pub fn checked_sub(self, other: u64) -> Option<GuestAddress> { in checked_sub() method
49 self.0.checked_sub(other).map(GuestAddress) in checked_sub()
/external/rust/crates/instant/src/
Dwasm.rs47 pub fn checked_sub(&self, duration: Duration) -> Option<Instant> { in checked_sub() method
48 self.0.checked_sub(duration).map(Instant) in checked_sub()
/external/rust/crates/tokio/src/time/
Dinstant.rs156 pub fn checked_sub(&self, duration: Duration) -> Option<Instant> { in checked_sub() method
157 self.std.checked_sub(duration).map(Instant::from_std) in checked_sub()
/external/crosvm/fuse/src/
Dserver.rs186 .checked_sub(size_of::<InHeader>()) in lookup()
298 .checked_sub(size_of::<InHeader>()) in symlink()
335 .checked_sub(size_of::<InHeader>()) in mknod()
336 .and_then(|l| l.checked_sub(size_of::<MknodIn>())) in mknod()
369 .checked_sub(size_of::<InHeader>()) in mkdir()
370 .and_then(|l| l.checked_sub(size_of::<MkdirIn>())) in mkdir()
424 .checked_sub(size_of::<InHeader>()) in unlink()
442 .checked_sub(size_of::<InHeader>()) in rmdir()
468 .checked_sub(size_of::<InHeader>()) in do_rename()
469 .and_then(|l| l.checked_sub(msg_size)) in do_rename()
[all …]
/external/rust/crates/ring/src/
Dbits.rs61 let sum = self.0.checked_sub(1).ok_or(error::Unspecified)?; in try_sub_1()
Daead.rs200 .checked_sub(in_prefix_len) in open_within_()
203 .checked_sub(TAG_LEN) in open_within_()
/external/rust/crates/rustversion/src/
Dtime.rs28 let approx_days = secs.checked_sub(BASE)? / 60 / 60 / 24; in try_today()
/external/rust/crates/ring/src/aead/
Dshift.rs24 let in_out_len = in_out.len().checked_sub(in_prefix_len).unwrap();
Daes.rs98 let in_out_len = in_out.len().checked_sub(in_prefix_len).unwrap(); in ctr32_encrypt_blocks_()
210 let in_out_len = in_out.len().checked_sub(in_prefix_len).unwrap(); in ctr32_encrypt_blocks()
/external/crosvm/rutabaga_gfx/src/
Dmacros.rs37 checked_arithmetic!($x checked_sub $y "-")
/external/rust/crates/aho-corasick/src/
Dbuffer.rs113 .checked_sub(self.min) in roll()
/external/rust/crates/chrono/src/
Doldtime.rs227 pub fn checked_sub(&self, rhs: &Duration) -> Option<Duration> { in checked_sub() method
228 let mut secs = try_opt!(self.secs.checked_sub(rhs.secs)); in checked_sub()
232 secs = try_opt!(secs.checked_sub(1)); in checked_sub()
585 Duration::milliseconds(i64::MIN).checked_sub(&Duration::milliseconds(0)), in test_duration_checked_ops()
588 assert!(Duration::milliseconds(i64::MIN).checked_sub(&Duration::milliseconds(1)).is_none()); in test_duration_checked_ops()
/external/adhd/cras/src/server/rust/src/
Drate_estimator.rs165 let delta = match now.checked_sub(start) { in update_estimated_rate()
/external/rust/crates/rayon/src/iter/
Dpar_bridge.rs129 match count.checked_sub(1) { in split()
/external/rust/crates/regex-syntax/src/hir/
Dinterval.rs490 self.checked_sub(1).unwrap() in decrement()
515 c => char::from_u32((c as u32).checked_sub(1).unwrap()).unwrap(), in decrement()
/external/rust/crates/ring/src/rsa/
Dpadding.rs432 let db_len = em_len.checked_sub(1 + s_len).ok_or(error::Unspecified)?; in new()
433 let ps_len = db_len.checked_sub(h_len + 1).ok_or(error::Unspecified)?; in new()
/external/rust/crates/zip/src/
Dread.rs251 .checked_sub(footer.central_directory_size as u64) in get_directory_counts()
252 .and_then(|x| x.checked_sub(footer.central_directory_offset as u64)) in get_directory_counts()
279 … .checked_sub(60) // minimum size of Zip64CentralDirectoryEnd + Zip64CentralDirectoryEndLocator in get_directory_counts()
724 Component::ParentDir => depth = depth.checked_sub(1)?, in enclosed_name()
Dspec.rs72 pos = match pos.checked_sub(1) { in find_and_parse()
/external/rust/crates/parking_lot_core/src/thread_parker/windows/
Dkeyed_event.rs147 .and_then(|x| x.checked_sub((diff.subsec_nanos() as i64 + 99) / 100)); in park_until()

123