rustyroad 1.3.0

Rusty Road is a framework written in Rust that is based on Ruby on Rails. It is designed to provide the familiar conventions and ease of use of Ruby on Rails, while also taking advantage of the performance and efficiency of Rust.
Documentation
use std::fmt::{Display, Formatter};
use std::path::PathBuf;

#[derive(Clone, Debug, Eq, PartialEq)]
pub enum BreakingChangeKind {
    ColumnTypeChange,
    ExplicitCast,
    ConstraintDrop,
}

impl Display for BreakingChangeKind {
    fn fmt(&self, formatter: &mut Formatter<'_>) -> std::fmt::Result {
        let description = match self {
            Self::ColumnTypeChange => "column type change",
            Self::ExplicitCast => "explicit data cast",
            Self::ConstraintDrop => "constraint removal",
        };
        formatter.write_str(description)
    }
}

#[derive(Clone, Debug, Eq, PartialEq)]
pub struct BreakingChangeFinding {
    pub path: PathBuf,
    pub line: usize,
    pub kind: BreakingChangeKind,
    pub sql: String,
}

impl Display for BreakingChangeFinding {
    fn fmt(&self, formatter: &mut Formatter<'_>) -> std::fmt::Result {
        write!(
            formatter,
            "{}:{}: {}: {}",
            self.path.display(),
            self.line,
            self.kind,
            self.sql
        )
    }
}