Add solution
This commit is contained in:
parent
2057e0b0f0
commit
bf9f321870
|
@ -68,6 +68,13 @@ fn main() {
|
|||
let x = 1_000.000_1; // f64
|
||||
let y: f32 = 0.12; // f32
|
||||
let z = 0.01_f64; // f64
|
||||
|
||||
assert_eq!(type_of(&x), "f64".to_string());
|
||||
println!("Success!");
|
||||
}
|
||||
|
||||
fn type_of<T>(_: &T) -> String {
|
||||
format!("{}", std::any::type_name::<T>())
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue