From 84fde47d00bb3ccba3876ad2b2e46c5c59cd07c4 Mon Sep 17 00:00:00 2001 From: Ville Penttinen Date: Thu, 4 Apr 2019 18:06:22 +0300 Subject: Move test specific things --- crates/ra_ide_api/src/call_info.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'crates/ra_ide_api') diff --git a/crates/ra_ide_api/src/call_info.rs b/crates/ra_ide_api/src/call_info.rs index a65119315..3c53bd11a 100644 --- a/crates/ra_ide_api/src/call_info.rs +++ b/crates/ra_ide_api/src/call_info.rs @@ -118,16 +118,6 @@ impl CallInfo { fn parameters(&self) -> &[String] { &self.signature.parameters } - - #[cfg(test)] - fn doc(&self) -> Option<&hir::Documentation> { - self.signature.doc.as_ref() - } - - #[cfg(test)] - fn label(&self) -> String { - self.signature.to_string() - } } #[cfg(test)] @@ -138,6 +128,17 @@ mod tests { use super::*; + // These are only used when testing + impl CallInfo { + fn doc(&self) -> Option { + self.signature.doc.clone() + } + + fn label(&self) -> String { + self.signature.to_string() + } + } + fn call_info(text: &str) -> CallInfo { let (analysis, position) = single_file_with_position(text); analysis.call_info(position).unwrap().unwrap() -- cgit v1.2.3