This commit is contained in:
Jessie committed 2023-09-21 23:52:00 -04:00
1 parent 18383c9e20
commit ac89ef0821
2 files changed
+153 -9

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
use anything::{Anything, Nothing};
pub fn func_1() -> Result<(),Anything> {
Err(())?;
Ok(())
}
pub fn func_2() -> Result<(),Anything> {
Err("Hello World")?;
Ok(())
}
pub fn func_3() -> Result<(),Nothing> {
Err("Hello World")?;
Ok(())
}
#[test]
pub fn test() {
println!("{:?}", func_1().unwrap_err());
println!("{:?}", func_2().unwrap_err());
println!("{:?}", func_3().unwrap_err());
}