1 // rustfmt-indent_style: Block
16 let hyper = Arc::new(Client::with_connector(
17 HttpsConnector::new(TlsClient::new()),
21 let x = yooooooooooooo
23 .baaaaaaaaaaaaar(hello, world);
30 .client_credentials(&self.config.auth.oauth2.id, &self.config.auth.oauth2.secret)?;
34 // nesting macro and function call
36 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
37 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
40 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
41 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
47 fn map_pixel_to_coords(&self, point: &Vector2i, view: &View) -> Vector2f {
49 Vector2f::from_raw(ffi::sfRenderTexture_mapPixelToCoords(
68 fn query(conn: &Connection) -> Result<()> {
86 fn future_rayon_wait_1_thread() {
87 // run with only 1 worker thread; this would deadlock if we couldn't make progress
88 let mut result = None;
89 ThreadPool::new(Configuration::new().num_threads(1))
93 use std::sync::mpsc::channel;
94 let (tx, rx) = channel();
95 let a = s.spawn_future(lazy(move || Ok::<usize, ()>(rx.recv().unwrap())));
96 // ^^^^ FIXME: why is this needed?
97 let b = s.spawn_future(a.map(|v| v + 1));
98 let c = s.spawn_future(b.map(|v| v + 1));
99 s.spawn(move |_| tx.send(20).unwrap());
100 result = Some(c.rayon_wait().unwrap());
103 assert_eq!(result, Some(22));
112 let n: c_int = unsafe { clang_Cursor_getNumTemplateArguments(self.x) };
117 debug_assert_eq!(n, -1);
122 let canonical = self.canonical();
123 if canonical != *self {
124 canonical.num_template_args()
133 bootstrap.checks.register("PERSISTED_LOCATIONS", move || {
134 if locations2.0.inner_mut.lock().poisoned {
137 "Persisted location storage is poisoned due to a write failure",
140 Check::new(State::Healthy, "Persisted location storage is healthy")
147 let type_list: Vec<_> =
148 try_opt!(types.iter().map(|ty| ty.rewrite(context, shape)).collect());