bbecs_tutorial 1.0.3

An ECS library made for a tutorial.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use eyre::Result;

#[test]
fn converting_options_to_results() -> Result<()> {
    let something = maybe_something().ok_or(CustomError::SomethingWasNothing)?;
    assert_eq!(something, 52);
    Ok(())
}

fn maybe_something() -> Option<u32> {
    Some(52)
}

#[derive(Debug, thiserror::Error)]
enum CustomError {
    #[error("Something wasn't really something, it turned out to be nothing")]
    SomethingWasNothing,
}