Skip to main content

oxilean_codegen/futhark_backend/
futharkversion_traits.rs

1//! # FutharkVersion - Trait Implementations
2//!
3//! This module contains trait implementations for `FutharkVersion`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Display`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use super::types::FutharkVersion;
12use std::fmt;
13
14impl std::fmt::Display for FutharkVersion {
15    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16        match self {
17            FutharkVersion::V020 => write!(f, "0.20"),
18            FutharkVersion::V021 => write!(f, "0.21"),
19            FutharkVersion::V022 => write!(f, "0.22"),
20            FutharkVersion::V023 => write!(f, "0.23"),
21            FutharkVersion::V024 => write!(f, "0.24"),
22            FutharkVersion::V025 => write!(f, "0.25"),
23            FutharkVersion::Latest => write!(f, "latest"),
24        }
25    }
26}