raos 0.0.2

Async Rust implementation of the OAuth 2.1 Authorization Server
Documentation
1
2
3
4
5
6
7
8
9
pub(crate) trait NoneIfEmpty {
    fn none_if_empty(self) -> Self;
}

impl NoneIfEmpty for Option<String> {
    fn none_if_empty(self) -> Self {
        self.and_then(|value| if value.is_empty() { None } else { Some(value) })
    }
}