Skip to content

Commit 13d4cce

Browse files
sypharGuillaumeGomez
authored andcommittedJan 12, 2025·
don't clone in get_rustdoc
1 parent d016fd0 commit 13d4cce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/db/add_package.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ fn get_readme(pkg: &MetadataPackage, source_dir: &Path) -> Result<Option<String>
447447
}
448448

449449
fn get_rustdoc(pkg: &MetadataPackage, source_dir: &Path) -> Result<Option<String>> {
450-
if let Some(src_path) = &pkg.targets.first().and_then(|t| t.src_path.clone()) {
450+
if let Some(src_path) = &pkg.targets.first().and_then(|t| t.src_path.as_ref()) {
451451
let src_path = Path::new(src_path);
452452
if src_path.is_absolute() {
453453
read_rust_doc(src_path)

0 commit comments

Comments
 (0)
Please sign in to comment.