dofus-framework 0.1.16

This crate contains modules and functions that help sustain a dofus emulator binary application
Documentation
1
2
3
4
5
6
7
8
9
10
11
pub trait OptionExt<T> {
    fn if_present<E: Fn(&T)>(&self, action: E);
}

impl<T> OptionExt<T> for Option<T> {
    fn if_present<E: Fn(&T)>(&self, action: E) {
        if let Some(value) = self {
            action(value);
        }
    }
}