some/
lib.rs

1trait Some where Self: Sized {
2    fn some(self) -> Option<Self>  {
3        Some(self)
4    }
5}
6
7impl<T> Some for T {}
8
9
10#[cfg(test)]
11mod tests {
12    use crate::Some;
13
14    #[test]
15    fn it_works() {
16        assert_eq!(4.some(), Some(4));
17    }
18}