temp-converter 3.1.4

Simple terminal temperature unit converter between Celsius, Fahrenheit and Kelvin.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mod cli;
mod float;

use clap::Parser;
use cli::Cli;
use float::Float;

fn main() -> anyhow::Result<()> {
    let cli = Cli::parse();
    let value = Float::from_str(&cli.value, cli.double)?;
    let result = value.convert(cli.from, cli.to);

    println!("{result}");

    Ok(())
}