Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[cfg(feature="f64")]
- type Float = f64;
- #[cfg(not(feature="f64"))]
- type Float = f32;
- fn take_float(f: Float) -> Float {
- f
- }
- fn main() {
- println!("Float value is {}", take_float(5.0));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement