blues-lsp 0.1.0

LSP language server for the Bluespec SystemVerilog language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pub trait OptionThenExt {
    type Inner;
    fn then(self, f: impl FnOnce(Self::Inner));
}

impl<T> OptionThenExt for Option<T> {
    type Inner = T;

    fn then(self, f: impl FnOnce(Self::Inner)) {
        if let Some(inner) = self {
            (f)(inner)
        }
    }
}