mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
24 lines
273 B
Rust
24 lines
273 B
Rust
enum MyResult {
|
|
Ok(()),
|
|
Err(())
|
|
}
|
|
|
|
impl MyResult {
|
|
fn wat(self) -> MyResult {
|
|
println!("wat");
|
|
self
|
|
}
|
|
}
|
|
|
|
fn hi2u() -> MyResult {
|
|
Ok(())
|
|
}
|
|
|
|
fn zomg() -> MyResult {
|
|
Ok(try!(hi2u().wat()))
|
|
}
|
|
|
|
fn main() {
|
|
println!("{:?}", zomg());
|
|
}
|