refactor(xatu): rename binding value expression
This commit is contained in:
@@ -34,7 +34,7 @@ pub enum NodeData {
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Binding {
|
||||
pub key: Ident,
|
||||
pub value: BindingValue,
|
||||
pub value: Expr,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
@@ -43,7 +43,7 @@ pub struct Ident {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum BindingValue {
|
||||
pub enum Expr {
|
||||
Ident(Ident),
|
||||
Selector(Selector),
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ impl TryFrom<rnix::ast::AttrpathValue> for ast::Binding {
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<rnix::ast::Expr> for ast::BindingValue {
|
||||
impl TryFrom<rnix::ast::Expr> for ast::Expr {
|
||||
type Error = ();
|
||||
|
||||
fn try_from(expr: rnix::ast::Expr) -> Result<Self, Self::Error> {
|
||||
|
||||
@@ -15,7 +15,7 @@ impl NodeRule for ManualInherit {
|
||||
|
||||
fn check(node: &Self::Node) -> Option<&'static str> {
|
||||
match &node.value {
|
||||
ast::BindingValue::Ident(value) if node.key == *value => {
|
||||
ast::Expr::Ident(value) if node.key == *value => {
|
||||
Some("Use `inherit` for this assignment")
|
||||
}
|
||||
_ => None,
|
||||
|
||||
@@ -15,7 +15,7 @@ impl NodeRule for ManualInheritFrom {
|
||||
|
||||
fn check(node: &Self::Node) -> Option<&'static str> {
|
||||
match &node.value {
|
||||
ast::BindingValue::Selector(selector) if node.key == selector.attr => {
|
||||
ast::Expr::Selector(selector) if node.key == selector.attr => {
|
||||
Some("Use `inherit` for this selected attribute")
|
||||
}
|
||||
_ => None,
|
||||
|
||||
Reference in New Issue
Block a user