1 // rustfmt-fn_call_style: Block
16 let hyper = Arc::new(Client::with_connector(HttpsConnector::new(
23 fn map_pixel_to_coords(&self, point: &Vector2i, view: &View) -> Vector2f {
25 Vector2f::from_raw(ffi::sfRenderTexture_mapPixelToCoords(
45 fn query(conn: &Connection) -> Result<()> {
65 fn future_rayon_wait_1_thread() {
66 // run with only 1 worker thread; this would deadlock if we couldn't make progress
67 let mut result = None;
68 ThreadPool::new(Configuration::new().num_threads(1))
72 use std::sync::mpsc::channel;
73 let (tx, rx) = channel();
74 let a = s.spawn_future(lazy(move || Ok::<usize, ()>(rx.recv().unwrap())));
75 // ^^^^ FIXME: why is this needed?
76 let b = s.spawn_future(a.map(|v| v + 1));
77 let c = s.spawn_future(b.map(|v| v + 1));
78 s.spawn(move |_| tx.send(20).unwrap());
79 result = Some(c.rayon_wait().unwrap());
82 assert_eq!(result, Some(22));
91 let n: c_int = unsafe { clang_Cursor_getNumTemplateArguments(self.x) };
96 debug_assert_eq!(n, -1);
101 let canonical = self.canonical();
102 if canonical != *self {
103 canonical.num_template_args()