diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2024-07-24 12:23:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-24 12:23:16 -0700 |
commit | b305ba3e1c155a33139ec0d764f547ffde4d4de4 (patch) | |
tree | e6c915b8a91a6195d6c681551e6625429f83fab1 /cli/tools/doc.rs | |
parent | fcd9bbe8eeec7d418b47544b6699e405c4d83826 (diff) |
perf: update deno_doc (#24700)
Ref https://github.com/denoland/deno_doc/pull/616
Diffstat (limited to 'cli/tools/doc.rs')
-rw-r--r-- | cli/tools/doc.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/tools/doc.rs b/cli/tools/doc.rs index 824a3fc38..bc0d81cc9 100644 --- a/cli/tools/doc.rs +++ b/cli/tools/doc.rs @@ -178,10 +178,10 @@ pub async fn doc( .into_iter() .map(|node| deno_doc::html::DocNodeWithContext { origin: short_path.clone(), - ns_qualifiers: Rc::new(vec![]), + ns_qualifiers: Rc::new([]), kind_with_drilldown: - deno_doc::html::DocNodeKindWithDrilldown::Other(node.kind), - inner: std::sync::Arc::new(node), + deno_doc::html::DocNodeKindWithDrilldown::Other(node.kind()), + inner: Rc::new(node), drilldown_parent_kind: None, parent: None, }) @@ -300,7 +300,7 @@ impl deno_doc::html::HrefResolver for DocResolver { } fn resolve_source(&self, location: &deno_doc::Location) -> Option<String> { - Some(location.filename.clone()) + Some(location.filename.to_string()) } } @@ -492,9 +492,9 @@ fn print_docs_to_stdout( doc_flags: DocFlags, mut doc_nodes: Vec<deno_doc::DocNode>, ) -> Result<(), AnyError> { - doc_nodes.retain(|doc_node| doc_node.kind != doc::DocNodeKind::Import); + doc_nodes.retain(|doc_node| doc_node.kind() != doc::DocNodeKind::Import); let details = if let Some(filter) = doc_flags.filter { - let nodes = doc::find_nodes_by_name_recursively(doc_nodes, filter.clone()); + let nodes = doc::find_nodes_by_name_recursively(doc_nodes, &filter); if nodes.is_empty() { bail!("Node {} was not found!", filter); } |