Home
last modified time | relevance | path

Searched refs:try_opt (Results 1 – 7 of 7) sorted by relevance

/external/rust/crates/clang-sys/src/
Dsupport.rs31 macro_rules! try_opt { macro
122 if let Some(path) = try_opt!(glob::glob(&pattern).ok()) in find()
187 let start = try_opt!(output.find("version ")) + 8; in parse_version()
188 let mut numbers = try_opt!(output[start..].split_whitespace().next()).split('.'); in parse_version()
189 let major = try_opt!(numbers.next().and_then(parse_version_number)); in parse_version()
190 let minor = try_opt!(numbers.next().and_then(parse_version_number)); in parse_version()
204 let start = try_opt!(output.find("#include <...> search starts here:")) + 34; in parse_search_paths()
205 let end = try_opt!(output.find("End of search list.")); in parse_search_paths()
/external/rust/crates/chrono/src/
Doldtime.rs38 macro_rules! try_opt { macro
195 let secs_part = try_opt!(self.num_seconds().checked_mul(MICROS_PER_SEC)); in num_microseconds()
203 let secs_part = try_opt!(self.num_seconds().checked_mul(NANOS_PER_SEC as i64)); in num_nanoseconds()
210 let mut secs = try_opt!(self.secs.checked_add(rhs.secs)); in checked_add()
214 secs = try_opt!(secs.checked_add(1)); in checked_add()
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()
Ddate.rs229 let date = try_opt!(self.date.checked_add_signed(rhs)); in checked_add_signed()
238 let date = try_opt!(self.date.checked_sub_signed(rhs)); in checked_sub_signed()
Dlib.rs530 macro_rules! try_opt { macro
Ddatetime.rs221 let datetime = try_opt!(self.datetime.checked_add_signed(rhs)); in checked_add_signed()
231 let datetime = try_opt!(self.datetime.checked_sub_signed(rhs)); in checked_sub_signed()
/external/rust/crates/chrono/src/naive/
Ddate.rs895 let cycle = try_opt!((cycle as i32).checked_add(try_opt!(rhs.num_days().to_i32()))); in checked_add_signed()
929 let cycle = try_opt!((cycle as i32).checked_sub(try_opt!(rhs.num_days().to_i32()))); in checked_sub_signed()
Ddatetime.rs497 let date = try_opt!(self.date.checked_add_signed(OldDuration::seconds(rhs))); in checked_add_signed()
576 let date = try_opt!(self.date.checked_sub_signed(OldDuration::seconds(rhs))); in checked_sub_signed()