Function
add_link
(
from: &str,
to: &str,
kind: &str,
files: &mut BTreeMap<String, u32>,
links: &mut BTreeSet<(String, String, String)>,
)
Source from the content-addressed store, hash-verified
| 237 | } |
| 238 | |
| 239 | fn add_link( |
| 240 | from: &str, |
| 241 | to: &str, |
| 242 | kind: &str, |
| 243 | files: &mut BTreeMap<String, u32>, |
| 244 | links: &mut BTreeSet<(String, String, String)>, |
| 245 | ) { |
| 246 | if from.is_empty() || from == to { |
| 247 | return; |
| 248 | } |
| 249 | files.entry(from.into()).or_insert(2); |
| 250 | links.insert((from.into(), to.into(), kind.into())); |
| 251 | } |
| 252 | |
| 253 | fn collect_callers( |
| 254 | index: &SyntaxIndex, |