Skip to main content

oxilean_parse/ast/
pos_traits.rs

1//! # Pos - Trait Implementations
2//!
3//! This module contains trait implementations for `Pos`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Default`
8//! - `Display`
9//!
10//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
11
12use super::types::Pos;
13use std::fmt;
14
15impl Default for Pos {
16    fn default() -> Self {
17        Self::start()
18    }
19}
20
21impl fmt::Display for Pos {
22    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
23        write!(f, "{}:{}", self.line, self.col)
24    }
25}