Skip to content

Commit 5cc14de

Browse files
committed
chore(misc): ci activities and lint fixes
1 parent db358fc commit 5cc14de

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/workspace/workspace_symbol.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#[cfg(test)]
22
mod test {
33
use insta::assert_yaml_snapshot;
4-
use insta::internals::{Content, ContentPath};
54

65
use crate::config::Config;
76
use crate::state::ProtoLanguageState;
@@ -10,22 +9,22 @@ mod test {
109
fn test_workspace_symbols() {
1110
let current_dir = std::env::current_dir().unwrap();
1211
let ipath = vec![current_dir.join("src/workspace/input")];
13-
let a_uri = (&format!(
12+
let a_uri = format!(
1413
"file://{}/src/workspace/input/a.proto",
1514
current_dir.to_str().unwrap()
16-
))
15+
)
1716
.parse()
1817
.unwrap();
19-
let b_uri = (&format!(
18+
let b_uri = format!(
2019
"file://{}/src/workspace/input/b.proto",
2120
current_dir.to_str().unwrap()
22-
))
21+
)
2322
.parse()
2423
.unwrap();
25-
let c_uri = (&format!(
24+
let c_uri = format!(
2625
"file://{}/src/workspace/input/c.proto",
2726
current_dir.to_str().unwrap()
28-
))
27+
)
2928
.parse()
3029
.unwrap();
3130

@@ -49,7 +48,7 @@ mod test {
4948
);
5049
format!(
5150
"file://<redacted>/src/workspace/input/{}",
52-
c.as_str().unwrap().split('/').last().unwrap()
51+
c.as_str().unwrap().split('/').next_back().unwrap()
5352
)
5453

5554
})});
@@ -65,7 +64,7 @@ mod test {
6564
);
6665
format!(
6766
"file://<redacted>/src/workspace/input/{}",
68-
c.as_str().unwrap().split('/').last().unwrap()
67+
c.as_str().unwrap().split('/').next_back().unwrap()
6968
)
7069
})});
7170

@@ -75,11 +74,11 @@ mod test {
7574
assert!(
7675
c.as_str()
7776
.unwrap()
78-
.contains(&current_dir.to_str().unwrap())
77+
.contains(current_dir.to_str().unwrap())
7978
);
8079
format!(
8180
"file://<redacted>/src/workspace/input/{}",
82-
c.as_str().unwrap().split('/').last().unwrap()
81+
c.as_str().unwrap().split('/').next_back().unwrap()
8382
)
8483
})});
8584

0 commit comments

Comments
 (0)