mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
More type safety around names
This commit is contained in:
parent
a85c4280bf
commit
3b1a648539
6 changed files with 33 additions and 19 deletions
|
@ -2,7 +2,7 @@
|
|||
use std::{iter, sync::Arc};
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use base_db::{CrateId, CrateName, Edition, FileId};
|
||||
use base_db::{CrateDisplayName, CrateId, Edition, FileId};
|
||||
use either::Either;
|
||||
use hir_def::find_path::PrefixKind;
|
||||
use hir_def::{
|
||||
|
@ -103,7 +103,7 @@ impl Crate {
|
|||
db.crate_graph()[self.id].edition
|
||||
}
|
||||
|
||||
pub fn display_name(self, db: &dyn HirDatabase) -> Option<CrateName> {
|
||||
pub fn display_name(self, db: &dyn HirDatabase) -> Option<CrateDisplayName> {
|
||||
db.crate_graph()[self.id].display_name.clone()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue