Home
last modified time | relevance | path

Searched refs:or_else (Results 1 – 25 of 49) sorted by relevance

12

/external/adhd/cras/client/cras-sys/generator/src/
Dmain.rs15 fs::remove_file(&dst_dir).or_else(|e| { in copy_headers()
24 fs::create_dir(&dst_dir).or_else(|e| { in copy_headers()
45 fs::copy(&src, &dst).or_else(|e| { in copy_headers()
73 .or_else(|e| Err(format!("failed to read {:?}: {}", cras_types_path, e)))?; in modify_server_state_attributes()
75 let old = str::from_utf8(&bytes).or_else(|e| { in modify_server_state_attributes()
92 fs::write(&cras_types_path, new).or_else(|e| { in modify_server_state_attributes()
/external/rust/crates/syn/src/
Dpunctuated.rs545 .or_else(|| self.last.next().map(Pair::End)) in next()
558 .or_else(|| self.inner.next_back().map(|(t, p)| Pair::Punctuated(t, p))) in next_back()
595 .or_else(|| self.last.next().map(Pair::End)) in next()
608 .or_else(|| self.inner.next_back().map(|(t, p)| Pair::Punctuated(t, p))) in next_back()
635 .or_else(|| self.last.next().map(Pair::End)) in next()
648 .or_else(|| self.inner.next_back().map(|(t, p)| Pair::Punctuated(t, p))) in next_back()
785 .or_else(|| self.last.next()) in next()
793 .or_else(|| self.inner.next_back().map(|pair| &pair.0)) in next_back()
879 .or_else(|| self.last.next()) in next()
887 .or_else(|| self.inner.next_back().map(|pair| &mut pair.0)) in next_back()
/external/rust/crates/futures/tests_disabled/
Dall.rs29 is_future_v::<i32, u32, _>(f_ok(1).or_else(Err)); in result_smoke()
47 assert_done(|| f_ok(1).or_else(|a| Ok(a as i32 + 2)), r_ok(1)); in result_smoke()
48 assert_done(|| f_err(1).or_else(|a| Ok(a as i32 + 2)), r_ok(3)); in result_smoke()
49 assert_done(|| f_ok(1).or_else(|a| Err(a + 3)), r_ok(1)); in result_smoke()
50 assert_done(|| f_err(1).or_else(|a| Err(a + 4)), r_err(5)); in result_smoke()
74 assert_empty(|| empty().or_else(move |_| empty())); in test_empty()
76 assert_empty(|| f_err(1).or_else(move |_| empty())); in test_empty()
Dstream.rs115 fn or_else() { in or_else() function
116 assert_done(|| err_list().or_else(|a| { in or_else()
/external/rust/crates/unicode-normalization/src/
Dstream_safe.rs35 let next_ch = match self.buffer.take().or_else(|| self.iter.next()) { in next()
87 let decomp = compatibility_fully_decomposed(c).or_else(|| canonical_fully_decomposed(c)); in classify_nonstarters()
Dnormalize.rs36 |c| compatibility_fully_decomposed(c).or_else(|| canonical_fully_decomposed(c)); in decompose_compatible()
106 compose_hangul(a, b).or_else(|| composition_table(a, b)) in compose()
/external/rust/crates/futures/tests/
Dbasic_combinators.rs49 .or_else(move |x: i32| { in basic_try_future_combinators()
74 .or_else(move |x: i32| { in basic_try_future_combinators()
Deager_drop.rs126 .or_else(move |_| { in or_else_drops_eagerly()
/external/rust/crates/itertools/src/
Dput_back_n_impl.rs53 self.top.pop().or_else(|| self.iter.next()) in next()
Dpeek_nth.rs81 self.buf.pop_front().or_else(|| self.iter.next()) in next()
Dmultipeek_impl.rs85 self.buf.pop_front().or_else(|| self.iter.next()) in next()
/external/rust/crates/bindgen/src/ir/
Denum_ty.rs110 .or_else(|| { in from_ty()
126 .or_else(|| { in from_ty()
Dtemplate.rs251 declaration.specialized().or_else(|| { in from_ty()
/external/rust/crates/futures-util/src/stream/try_stream/
Dmod.rs64 mod or_else; module
66 pub use self::or_else::OrElse;
284 fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F> in or_else() method
/external/rust/crates/tokio/src/task/
Dlocal.rs536 .or_else(|| self.context.tasks.borrow_mut().queue.pop_front()) in next_task()
543 .or_else(|| self.context.shared.queue.lock().unwrap().pop_front()) in next_task()
/external/rust/crates/csv/src/
Dlib.rs358 Option::<T>::deserialize(de).or_else(|_| Ok(None)) in invalid_option()
/external/rust/crates/rusqlite/src/types/
Dtime.rs24 .or_else(|err| { in column_result()
/external/rust/crates/tokio/src/runtime/thread_pool/
Dworker.rs449 worker.inject().pop().or_else(|| self.next_local_task()) in next_task()
451 self.next_local_task().or_else(|| worker.inject().pop()) in next_task()
456 self.lifo_slot.take().or_else(|| self.run_queue.pop()) in next_local_task()
/external/rust/crates/rusqlite/src/
Dtransaction.rs211 DropBehavior::Commit => self.commit_().or_else(|_| self.rollback_()), in finish_()
324 DropBehavior::Commit => self.commit_().or_else(|_| self.rollback()), in finish_()
/external/rust/crates/rayon-core/src/
Dregistry.rs170 .or_else(|err| unsafe { THE_REGISTRY.ok_or(err) }) in global_registry()
726 .or_else(|| self.steal()) in wait_until_cold()
727 .or_else(|| self.registry.pop_injected_job(self.index)) in wait_until_cold()
/external/rust/crates/tokio/src/runtime/
Dbasic_scheduler.rs224 scheduler.spawner.pop().or_else(|| { in block_on()
239 .or_else(|| scheduler.spawner.pop()) in block_on()
/external/rust/crates/crossbeam-deque/
DCHANGELOG.md28 - Add `Steal::or_else()` and implement `FromIterator` for `Steal`.
/external/rust/crates/codespan-reporting/examples/
Dcustom_files.rs140 .or_else(|next_line| Ok(next_line - 1)) in line_index()
/external/rust/crates/clang-sys/build/
Ddynamic.rs253 let name = match name.find(".dylib").or_else(|| name.find(".so")) { in link()
/external/rust/crates/clang-sys/out/
Ddynamic.rs253 let name = match name.find(".dylib").or_else(|| name.find(".so")) { in link()

12