Skip to content

Commit

Permalink
don't clone in get_rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar authored and GuillaumeGomez committed Jan 12, 2025
1 parent d016fd0 commit 13d4cce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/db/add_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ fn get_readme(pkg: &MetadataPackage, source_dir: &Path) -> Result<Option<String>
}

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

0 comments on commit 13d4cce

Please sign in to comment.