mirror of
https://git.intege.rs/xlib/anything
synced 2025-12-05 20:35:02 +00:00
.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
Reference in New Issue
Block a user