Skip to content

Commit 5e796b9

Browse files
committed
minor: fmt & clippy
1 parent 669f81d commit 5e796b9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

crates/syntax/src/ast/syntax_factory/constructors.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ impl SyntaxFactory {
7171
ast
7272
}
7373

74-
7574
pub fn path_from_text(&self, text: &str) -> ast::Path {
7675
make::path_from_text(text).clone_for_update()
7776
}
@@ -213,10 +212,10 @@ impl SyntaxFactory {
213212

214213
if let Some(mut mapping) = self.mappings() {
215214
let mut builder = SyntaxMappingBuilder::new(ast.syntax().clone());
216-
if let Some(self_param) = self_param {
217-
if let Some(new_self_param) = ast.self_param() {
218-
builder.map_node(self_param.syntax().clone(), new_self_param.syntax().clone());
219-
}
215+
if let Some(self_param) = self_param
216+
&& let Some(new_self_param) = ast.self_param()
217+
{
218+
builder.map_node(self_param.syntax().clone(), new_self_param.syntax().clone());
220219
}
221220
builder.map_children(input, ast.params().map(|p| p.syntax().clone()));
222221
builder.finish(&mut mapping);

0 commit comments

Comments
 (0)