Home
last modified time | relevance | path

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

/linux/rust/macros/
H A Dpinned_drop.rs
/linux/rust/pin-init/internal/src/
H A Dpinned_drop.rs
/linux/rust/kernel/ptr/
H A Dprojection.rs115 let new_len = self.end.checked_sub(self.start)?;
/linux/rust/zerocopy/src/
H A Dbyteorder.rs1081 fn checked_sub(self, rhs: Self) -> Option<Self>; in checked_sub() method
1212 fn checked_sub(self, rhs: Self) -> Option<Self> { self.checked_sub(rhs) }
1222 fn checked_sub(self, rhs: Self) -> Option<Self> { Some(self - rhs) }
1544 test!(@binary Sub, sub[checked_sub], SubAssign, sub_assign, call_for_all_types); in test_ops_impls()
H A Dlayout.rs695 let max_slice_and_padding_bytes = match max_total_bytes.checked_sub(offset) { in validate_cast_and_convert_metadata()
935 let offset_delta = if let Some(od) = src_size.checked_sub(dst.offset) { in project()
966 let offset_delta = if let Some(od) = src.offset.checked_sub(dst.offset) in project()
H A Dref.rs251 let split_at = if let Some(split_at) = bytes_len.checked_sub(mem::size_of::<T>()) { in sized_from_suffix()
597 let split_at = if let Some(split_at) = source.len().checked_sub(expected_len) { in from_suffix_with_elems()
H A Dlib.rs6108 let start = if let Some(start) = dst.len().checked_sub(src.len()) { in write_to_suffix()
/linux/drivers/android/binder/range_alloc/
H A Darray.rs124 match self.free_oneway_space.checked_sub(size) { in reserve_new()
H A Dtree.rs159 match self.free_oneway_space.checked_sub(size) { in reserve_new()
/linux/rust/kernel/
H A Duaccess.rs225 self.length = self.length.checked_sub(num_skip).ok_or(EFAULT)?; in skip()
H A Dmaple_tree.rs65 Bound::Excluded(end) => end.checked_sub(1)?, in to_maple_range()
/linux/rust/kernel/alloc/
H A Dkvec.rs705 if let Some(count) = self.len().checked_sub(len) {
974 match new_len.checked_sub(self.len()) {
/linux/rust/zerocopy/src/util/
H A Dmod.rs779 match self.checked_sub(rhs) { in unchecked_sub()
/linux/drivers/android/binder/
H A Dprocess.rs1081 let offset = ptr.checked_sub(mapping.address)?; in buffer_get()
1093 let offset = match ptr.checked_sub(mapping.address) { in buffer_raw_free()