use IdentStr

This commit is contained in:
Folkert 2021-08-03 21:14:36 +02:00
parent bd35770e9a
commit ceb5cc66fa
30 changed files with 241 additions and 219 deletions

View file

@ -3,7 +3,6 @@ use crate::docs::TypeAnnotation::{
Apply, BoundVariable, Function, NoTypeAnn, ObscuredRecord, ObscuredTagUnion, Record, TagUnion,
};
use crate::file::LoadedModule;
use inlinable_string::InlinableString;
use roc_can::scope::Scope;
use roc_module::ident::ModuleName;
use roc_module::symbol::IdentIds;
@ -169,10 +168,7 @@ fn generate_entry_doc<'a>(
Def::Annotation(loc_pattern, _loc_ann) => match loc_pattern.value {
Pattern::Identifier(identifier) => {
// Check if the definition is exposed
if ident_ids
.get_id(&InlinableString::from(identifier))
.is_some()
{
if ident_ids.get_id(&identifier.into()).is_some() {
let doc_def = DocDef {
name: identifier.to_string(),
type_annotation: NoTypeAnn,
@ -193,10 +189,7 @@ fn generate_entry_doc<'a>(
} => match ann_pattern.value {
Pattern::Identifier(identifier) => {
// Check if the definition is exposed
if ident_ids
.get_id(&InlinableString::from(identifier))
.is_some()
{
if ident_ids.get_id(&identifier.into()).is_some() {
let doc_def = DocDef {
name: identifier.to_string(),
type_annotation: type_to_docs(false, ann_type.value),