#RustQuiz: what is the output?

A. prints
fn1
fn2
1

B. prints
fn1
1

C. Compilation error

D. Runtime panic

vote below 👇

#rustlang #rust

vote here
A
35.3%
B
42.4%
C
15.3%
D
7.1%
Poll ended at .

@AstraKernel Interesting... Most people voted B, but I am pretty sure it's A.

To get output B, I think main would need to be changed into

fn main() {
if let Some(x) = fn1().or_else(fn2) {
println!("{x}");
}
}