Skip to content

Commit 9e68112

Browse files
committed
fmt: cargo
1 parent bcf2141 commit 9e68112

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

src/formatting.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ pub(crate) async fn formatting(
2121
..Default::default()
2222
};
2323
let mut out = String::new();
24-
Stringifier::new(&mut out, "", "", options)
25-
.run(template)?;
24+
Stringifier::new(&mut out, "", "", options).run(template)?;
2625
let text_edit = TextEdit {
2726
range: lsp_types::Range {
2827
start: lsp_types::Position {

src/semantic/wxml.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use glass_easel_template_compiler::parse::{
22
expr::{ArrayFieldKind, Expression, ObjectFieldKind},
33
tag::{
4-
ClassAttribute, CommonElementAttributes, ElementKind, Ident, Node, NormalAttributePrefix, Script, StrName, StyleAttribute, Value
4+
ClassAttribute, CommonElementAttributes, ElementKind, Ident, Node, NormalAttributePrefix,
5+
Script, StrName, StyleAttribute, Value,
56
},
67
Position, Template,
78
};

src/wxml_utils.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ use std::ops::Range;
33
use glass_easel_template_compiler::parse::{
44
expr::Expression,
55
tag::{
6-
ClassAttribute, Comment, CommonElementAttributes, Element, ElementKind, Ident, Node, NormalAttributePrefix, Script, StaticAttribute, StrName, StyleAttribute, TagLocation, UnknownMetaTag, Value
6+
ClassAttribute, Comment, CommonElementAttributes, Element, ElementKind, Ident, Node,
7+
NormalAttributePrefix, Script, StaticAttribute, StrName, StyleAttribute, TagLocation,
8+
UnknownMetaTag, Value,
79
},
810
Position, Template,
911
};
@@ -372,7 +374,9 @@ pub(crate) fn find_token_in_position(template: &Template, pos: Position) -> Toke
372374
}
373375
return Token::AttributeName(&attr.name, elem);
374376
}
375-
if let Some(ret) = find_in_option_value(&attr.value, pos, scopes) {
377+
if let Some(ret) =
378+
find_in_option_value(&attr.value, pos, scopes)
379+
{
376380
if let Token::StaticValuePart(loc, v) = ret {
377381
return Token::AttributeStaticValue(
378382
loc, v, &attr.name, elem,
@@ -385,7 +389,9 @@ pub(crate) fn find_token_in_position(template: &Template, pos: Position) -> Toke
385389
if ident_contains(&attr.name, pos) {
386390
return Token::AttributeName(&attr.name, elem);
387391
}
388-
if let Some(ret) = find_in_option_value(&attr.value, pos, scopes) {
392+
if let Some(ret) =
393+
find_in_option_value(&attr.value, pos, scopes)
394+
{
389395
if let Token::StaticValuePart(loc, v) = ret {
390396
return Token::AttributeStaticValue(
391397
loc, v, &attr.name, elem,
@@ -639,7 +645,9 @@ pub(crate) fn find_token_in_position(template: &Template, pos: Position) -> Toke
639645
if ident_contains(&attr.name, pos) {
640646
return Token::SlotValueDefinition(&attr.name);
641647
}
642-
if let Some(ret) = find_in_option_value(&attr.value, pos, scopes) {
648+
if let Some(ret) =
649+
find_in_option_value(&attr.value, pos, scopes)
650+
{
643651
return ret;
644652
}
645653
}

0 commit comments

Comments
 (0)