Skip to content

Commit c3409d9

Browse files
committed
Cargo fmt
1 parent 36c9ca7 commit c3409d9

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

vhdl_lang/src/analysis/names.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -960,8 +960,15 @@ impl<'a> AnalyzeContext<'a> {
960960
) -> EvalResult<TypeEnt<'a>> {
961961
// all type attribute suffixes require that the prefix be an object type
962962
let Some(obj) = prefix.as_object_name() else {
963-
diagnostics.error(pos,format!("The {} attribute can only be used on objects, not {}", suffix, prefix.describe()));
964-
return Err(EvalError::Unknown)
963+
diagnostics.error(
964+
pos,
965+
format!(
966+
"The {} attribute can only be used on objects, not {}",
967+
suffix,
968+
prefix.describe()
969+
),
970+
);
971+
return Err(EvalError::Unknown);
965972
};
966973
match suffix {
967974
TypeAttribute::Subtype => Ok(obj.type_mark()),

vhdl_lang/src/data/contents.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,7 @@ impl Contents {
117117

118118
let end_line = std::cmp::min(self.lines.len().saturating_sub(1), end_line);
119119
self.lines
120-
.splice(
121-
start_line..=end_line,
122-
split_lines(&merged_content),
123-
)
120+
.splice(start_line..=end_line, split_lines(&merged_content))
124121
.count();
125122
}
126123
}

vhdl_lang/src/syntax/context.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ mod tests {
216216

217217
#[test]
218218
fn test_context_clause() {
219-
let variants = [&"\
219+
let variants = [
220+
&"\
220221
context ident is
221222
end;
222223
",
@@ -231,7 +232,8 @@ end ident;
231232
&"\
232233
context ident is
233234
end context ident;
234-
"];
235+
",
236+
];
235237
for (idx, variant) in variants.iter().enumerate() {
236238
let has_end_ident = idx >= 2;
237239
let code = Code::new(variant);

0 commit comments

Comments
 (0)