aboutsummaryrefslogtreecommitdiff
path: root/lib/src/make.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2022-02-20 05:25:20 +0000
committerAkshay <[email protected]>2022-02-20 05:31:36 +0000
commitc7874ec26d6499a1196ce23432beb33764490dec (patch)
tree226b8dce61e5f7580be9de7ebde72212bb94f682 /lib/src/make.rs
parente8130a90dca048d195603281f72e1af0b4f7ccc6 (diff)
new lint: useless_has_attr
Diffstat (limited to 'lib/src/make.rs')
-rw-r--r--lib/src/make.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/src/make.rs b/lib/src/make.rs
index c36fa7e..2c33ac8 100644
--- a/lib/src/make.rs
+++ b/lib/src/make.rs
@@ -88,3 +88,7 @@ pub fn empty() -> types::Root {
88pub fn binary(lhs: &SyntaxNode, op: &str, rhs: &SyntaxNode) -> types::BinOp { 88pub fn binary(lhs: &SyntaxNode, op: &str, rhs: &SyntaxNode) -> types::BinOp {
89 ast_from_text(&format!("{} {} {}", lhs, op, rhs)) 89 ast_from_text(&format!("{} {} {}", lhs, op, rhs))
90} 90}
91
92pub fn or_default(set: &SyntaxNode, index: &SyntaxNode, default: &SyntaxNode) -> types::OrDefault {
93 ast_from_text(&format!("{}.{} or {}", set, index, default))
94}