From 4b74fb1d896ce5a1c8c4c4bf73ad2940fb86abc5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 24 Nov 2019 16:03:02 +0300 Subject: Nicer API for attrs --- crates/ra_hir_def/src/lang_item.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir_def/src/lang_item.rs') diff --git a/crates/ra_hir_def/src/lang_item.rs b/crates/ra_hir_def/src/lang_item.rs index 69d7bf21a..3b9fb0328 100644 --- a/crates/ra_hir_def/src/lang_item.rs +++ b/crates/ra_hir_def/src/lang_item.rs @@ -113,7 +113,7 @@ impl LangItems { T: Into + Copy, { let attrs = db.attrs(item.into()); - if let Some(lang_item_name) = attrs.find_string_value("lang") { + if let Some(lang_item_name) = attrs.by_key("lang").string_value() { self.items.entry(lang_item_name.clone()).or_insert_with(|| constructor(item)); } } -- cgit v1.2.3