fix(render): fix clippy warning
This commit is contained in:
parent
1e92cfef5c
commit
37893a3f74
|
@ -42,20 +42,12 @@ pub enum RenderResult {
|
|||
Error(anyhow::Error),
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Context<'a> {
|
||||
pub global_vars: Vec<&'a Variable>,
|
||||
pub templates: Vec<&'a Template>,
|
||||
}
|
||||
|
||||
impl<'a> Default for Context<'a> {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
global_vars: Vec::new(),
|
||||
templates: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct RenderOptions {
|
||||
pub casing_style: CasingStyle,
|
||||
|
@ -77,23 +69,13 @@ pub enum CasingStyle {
|
|||
Uppercase,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Default)]
|
||||
pub struct Template {
|
||||
pub ids: Vec<String>,
|
||||
pub body: String,
|
||||
pub vars: Vec<Variable>,
|
||||
}
|
||||
|
||||
impl Default for Template {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
ids: Vec::new(),
|
||||
body: "".to_string(),
|
||||
vars: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct Variable {
|
||||
pub name: String,
|
||||
|
|
Loading…
Reference in New Issue
Block a user