Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit cee3c22

Browse files
vfs: Fix warnings about clippy str_to_string rule
1 parent 81c35d1 commit cee3c22

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

crates/vfs/src/loader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ impl Directories {
201201
/// ```
202202
fn dirs(base: AbsPathBuf, exclude: &[&str]) -> Directories {
203203
let exclude = exclude.iter().map(|it| base.join(it)).collect::<Vec<_>>();
204-
Directories { extensions: vec!["rs".to_string()], include: vec![base], exclude }
204+
Directories { extensions: vec!["rs".to_owned()], include: vec![base], exclude }
205205
}
206206

207207
impl fmt::Debug for Message {

crates/vfs/src/vfs_path/tests.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@ use super::*;
22

33
#[test]
44
fn virtual_path_extensions() {
5-
assert_eq!(VirtualPath("/".to_string()).name_and_extension(), None);
5+
assert_eq!(VirtualPath("/".to_owned()).name_and_extension(), None);
66
assert_eq!(
7-
VirtualPath("/directory".to_string()).name_and_extension(),
7+
VirtualPath("/directory".to_owned()).name_and_extension(),
88
Some(("directory", None))
99
);
1010
assert_eq!(
11-
VirtualPath("/directory/".to_string()).name_and_extension(),
11+
VirtualPath("/directory/".to_owned()).name_and_extension(),
1212
Some(("directory", None))
1313
);
1414
assert_eq!(
15-
VirtualPath("/directory/file".to_string()).name_and_extension(),
15+
VirtualPath("/directory/file".to_owned()).name_and_extension(),
1616
Some(("file", None))
1717
);
1818
assert_eq!(
19-
VirtualPath("/directory/.file".to_string()).name_and_extension(),
19+
VirtualPath("/directory/.file".to_owned()).name_and_extension(),
2020
Some((".file", None))
2121
);
2222
assert_eq!(
23-
VirtualPath("/directory/.file.rs".to_string()).name_and_extension(),
23+
VirtualPath("/directory/.file.rs".to_owned()).name_and_extension(),
2424
Some((".file", Some("rs")))
2525
);
2626
assert_eq!(
27-
VirtualPath("/directory/file.rs".to_string()).name_and_extension(),
27+
VirtualPath("/directory/file.rs".to_owned()).name_and_extension(),
2828
Some(("file", Some("rs")))
2929
);
3030
}

0 commit comments

Comments
 (0)