ubuntu-version 0.1.4

Convert Ubuntu versions to codenames, and vice versa
docs.rs failed to build ubuntu-version-0.1.4
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: ubuntu-version-0.2.5

ubuntu-version

This Rust crate exists to convert Ubuntu versions to codenames, and vice versa.

use ubuntu_version::{Codename, Version};

fn main() {
    let version = "18.04 LTS".parse::<Version>().unwrap();
    let codename = "bionic".parse::<Codename>().unwrap();

    let version = Version::from(codename);
    let codename = Codename::from(version);

    println!("{} ({})", version, codename);
    println!("{}", <&'static str>::from(codename));
}