mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
don't clone types that are copy (clippy::clone_on_copy)
This commit is contained in:
parent
c5d654d513
commit
048dad8c2e
12 changed files with 18 additions and 28 deletions
|
@ -93,7 +93,7 @@ pub(crate) fn remove_links(markdown: &str) -> String {
|
|||
|
||||
let mut cb = |_: BrokenLink| {
|
||||
let empty = InlineStr::try_from("").unwrap();
|
||||
Some((CowStr::Inlined(empty.clone()), CowStr::Inlined(empty)))
|
||||
Some((CowStr::Inlined(empty), CowStr::Inlined(empty)))
|
||||
};
|
||||
let doc = Parser::new_with_broken_link_callback(markdown, opts, Some(&mut cb));
|
||||
let doc = doc.filter_map(move |evt| match evt {
|
||||
|
@ -147,7 +147,7 @@ fn get_doc_link(db: &RootDatabase, definition: Definition) -> Option<String> {
|
|||
_ => return None,
|
||||
};
|
||||
|
||||
let ns = ItemInNs::from(target_def.clone());
|
||||
let ns = ItemInNs::from(target_def);
|
||||
|
||||
let module = definition.module(db)?;
|
||||
let krate = module.krate();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue