use serde::Serialize;
use crate::span::Span;
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct FixHint {
pub title: String,
pub explanation: String,
pub before: String,
pub after: String,
pub start: u32,
pub end: u32,
}
impl FixHint {
pub fn new(
title: impl Into<String>,
explanation: impl Into<String>,
before: impl Into<String>,
after: impl Into<String>,
span: Span,
) -> Self {
Self {
title: title.into(),
explanation: explanation.into(),
before: before.into(),
after: after.into(),
start: span.start.0,
end: span.end.0,
}
}
}