Internal cleanup: Replaces more uses of **foo with foo.as_str()

Same as commit 0b7dc17644, this makes it easier to see where the deref leads to.
This commit is contained in:
Simon Hausmann 2021-09-14 10:34:55 +02:00 committed by Simon Hausmann
parent 4779c97ba2
commit cd5385887b

View file

@ -153,7 +153,7 @@ impl<'a> TypeLoader<'a> {
let doc = self.all_documents.docs.get(&doc_path).unwrap();
doc.exports().iter().find_map(|(export_name, ty)| {
if type_name == &**export_name {
if type_name == export_name.as_str() {
Some(ty.clone())
} else {
None
@ -332,7 +332,7 @@ impl<'a> TypeLoader<'a> {
for import_name in imported_types {
let imported_type = exports.iter().find_map(|(export_name, ty)| {
if import_name.external_name == **export_name {
if import_name.external_name == export_name.as_str() {
Some(ty.clone())
} else {
None