Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/utils.rs')
-rw-r--r--crates/ide-assists/src/utils.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide-assists/src/utils.rs b/crates/ide-assists/src/utils.rs
index ba6ef1921a..c67693ea2b 100644
--- a/crates/ide-assists/src/utils.rs
+++ b/crates/ide-assists/src/utils.rs
@@ -88,8 +88,8 @@ pub fn has_test_related_attribute(attrs: &hir::AttrsWithOwner) -> bool {
let path = attr.path();
(|| {
Some(
- path.segments().first()?.as_text()?.starts_with("test")
- || path.segments().last()?.as_text()?.ends_with("test"),
+ path.segments().first()?.as_str().starts_with("test")
+ || path.segments().last()?.as_str().ends_with("test"),
)
})()
.unwrap_or_default()