Skip to content

Commit c7b2bc1

Browse files
committed
Move private API down
1 parent 1b19a8a commit c7b2bc1

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

crates/ra_ide/src/call_hierarchy.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,6 @@ use crate::{
1616
goto_definition, references, FilePosition, NavigationTarget, RangeInfo,
1717
};
1818

19-
#[derive(Default)]
20-
struct CallLocations {
21-
funcs: IndexMap<NavigationTarget, Vec<TextRange>>,
22-
}
23-
24-
impl CallLocations {
25-
pub fn add(&mut self, target: &NavigationTarget, range: TextRange) {
26-
self.funcs.entry(target.clone()).or_default().push(range);
27-
}
28-
29-
pub fn into_items(self) -> Vec<CallItem> {
30-
self.funcs.into_iter().map(|(target, ranges)| CallItem { target, ranges }).collect()
31-
}
32-
}
33-
3419
#[derive(Debug, Clone)]
3520
pub struct CallItem {
3621
pub target: NavigationTarget,
@@ -146,6 +131,21 @@ pub(crate) fn outgoing_calls(db: &RootDatabase, position: FilePosition) -> Optio
146131
Some(calls.into_items())
147132
}
148133

134+
#[derive(Default)]
135+
struct CallLocations {
136+
funcs: IndexMap<NavigationTarget, Vec<TextRange>>,
137+
}
138+
139+
impl CallLocations {
140+
fn add(&mut self, target: &NavigationTarget, range: TextRange) {
141+
self.funcs.entry(target.clone()).or_default().push(range);
142+
}
143+
144+
fn into_items(self) -> Vec<CallItem> {
145+
self.funcs.into_iter().map(|(target, ranges)| CallItem { target, ranges }).collect()
146+
}
147+
}
148+
149149
#[cfg(test)]
150150
mod tests {
151151
use ra_db::FilePosition;

0 commit comments

Comments
 (0)