1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use crate::{Integer, Fraction};


impl From<&Integer> for Fraction {
    fn from(value: &Integer) -> Self {
        Fraction(value.clone(), Integer::one())
    }
}

impl From<&u8> for Fraction {
    fn from(value: &u8) -> Self {
        let v_int: Integer = value.into();
        Fraction(v_int, Integer::one())
    }
    
}

impl From<&u16> for Fraction {
    fn from(value: &u16) -> Self {
        let v_int: Integer = value.into();
        Fraction(v_int, Integer::one())
    }
}

impl From<&u32> for Fraction {
    fn from(value: &u32) -> Self {
        let v_int: Integer = value.into();
        Fraction(v_int, Integer::one())
    }
}

impl From<&u64> for Fraction {
    fn from(value: &u64) -> Self {
        let v_int: Integer = value.into();
        Fraction(v_int, Integer::one())
    }
}

impl From<&u128> for Fraction {
    fn from(value: &u128) -> Self {
        let v_int: Integer = value.into();
        Fraction(v_int, Integer::one())
    }
}

impl From<&usize> for Fraction {
    fn from(value: &usize) -> Self {
        let v_int: Integer = value.into();
        Fraction(v_int, Integer::one())
    }
}