Skip to content

Commit 76e3fee

Browse files
committed
Remove unwrap in doc path resolution
1 parent fdd49b9 commit 76e3fee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/hir/src/attrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ fn resolve_doc_path(
147147
AttrDefId::MacroDefId(_) => return None,
148148
};
149149
let path = ast::Path::parse(link).ok()?;
150-
let modpath = ModPath::from_src(db.upcast(), path, &Hygiene::new_unhygienic()).unwrap();
150+
let modpath = ModPath::from_src(db.upcast(), path, &Hygiene::new_unhygienic())?;
151151
let resolved = resolver.resolve_module_path_in_items(db.upcast(), &modpath);
152152
let resolved = if resolved == PerNs::none() {
153153
resolver.resolve_module_path_in_trait_assoc_items(db.upcast(), &modpath)?

0 commit comments

Comments
 (0)