Skip to main content

oxilean_codegen/opt_licm/
loopnode_traits.rs

1//! # LoopNode - Trait Implementations
2//!
3//! This module contains trait implementations for `LoopNode`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Display`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use crate::lcnf::*;
12
13use super::types::LoopNode;
14use std::fmt;
15
16impl std::fmt::Display for LoopNode {
17    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18        let tc = self
19            .trip_count
20            .map(|t| t.to_string())
21            .unwrap_or("?".to_string());
22        write!(
23            f,
24            "Loop#{}(header={}, depth={}, trip={}, inner={})",
25            self.id.0, self.header, self.depth, tc, self.is_inner_most,
26        )
27    }
28}