Skip to content

Commit 2feaf45

Browse files
committed
refactor: Minor improvements
1 parent 8bb2371 commit 2feaf45

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

crates/roughly/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ mod tests {
124124
#[test]
125125
fn backwards_compatability() {
126126
let toml = indoc! {r#"
127-
case = "snake_case" # should override format.indent-width
128-
spaces = 6 # should override lint.naming-style
127+
case = "snake_case" # should override lint.naming-style
128+
spaces = 6 # should override format.indent-width
129129
130130
[format]
131131
indent-width = 4

crates/roughly/src/symbols.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ pub fn workspace(query: &str, workspace_symbols: &impl SymbolsMap) -> Vec<Worksp
4242
}
4343

4444
pub fn to_document_symbol(item: &Item) -> DocumentSymbol {
45-
#[allow(deprecated)]
4645
DocumentSymbol {
4746
name: item.display_name(),
4847
kind: to_symbol_kind(&item.info),
@@ -54,6 +53,7 @@ pub fn to_document_symbol(item: &Item) -> DocumentSymbol {
5453
.children
5554
.as_ref()
5655
.map(|children| children.iter().map(to_document_symbol).collect()),
56+
#[allow(deprecated)]
5757
deprecated: None,
5858
}
5959
}

crates/roughly/tests/format/special.R.test

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ x+y
4444

4545

4646
#==== complex_expressions
47+
#---- mixed_unary_binary
48+
1 + +1 - -1 * -1 / -2
49+
1++1--1*-1/-2
50+
4751
#---- chained_extract
4852
foo$
4953
bar(a)$
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
source: crates/roughly/tests/test_format.rs
3+
expression: code
4+
---
5+
1 + +1 - -1 * -1 / -2
6+
1 + +1 - -1 * -1 / -2

0 commit comments

Comments
 (0)