We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e077745 commit 7ac744eCopy full SHA for 7ac744e
tests/underscore.rs
@@ -0,0 +1,31 @@
1
+use pin_init::{try_init, Init};
2
+
3
+pub struct Foo {
4
+ x: u64,
5
+}
6
7
+fn foo() -> bool {
8
+ false
9
10
11
+fn bar() -> bool {
12
+ true
13
14
15
+impl Foo {
16
+ pub fn new() -> impl Init<Self, ()> {
17
+ try_init!(Self {
18
+ _: {
19
+ if foo() {
20
+ return Err(());
21
+ }
22
+ },
23
+ x: 0,
24
25
+ if bar() {
26
27
28
29
+ }? ())
30
31
0 commit comments