Move FunctionSignature to display, remove write_joined

write_joined is replaced with `join_to_string::join` which provides the
necessary functionality.
This commit is contained in:
Ville Penttinen 2019-04-04 19:30:20 +03:00
parent 84fde47d00
commit 7ba22f1c19
2 changed files with 36 additions and 49 deletions

View file

@ -73,6 +73,7 @@ pub use crate::{
syntax_highlighting::HighlightedRange,
structure::{StructureNode, file_structure},
diagnostics::Severity,
display::FunctionSignature,
};
pub use ra_db::{
@ -248,32 +249,6 @@ pub struct CallInfo {
pub active_parameter: Option<usize>,
}
/// Contains information about a function signature
#[derive(Debug)]
pub struct FunctionSignature {
/// Optional visibility
pub visibility: Option<String>,
/// Name of the function
pub name: Option<String>,
/// Documentation for the function
pub doc: Option<Documentation>,
/// Generic parameters
pub generic_parameters: Vec<String>,
/// Parameters of the function
pub parameters: Vec<String>,
/// Optional return type
pub ret_type: Option<String>,
/// Where predicates
pub where_predicates: Vec<String>,
}
impl FunctionSignature {
pub(crate) fn with_doc_opt(mut self, doc: Option<Documentation>) -> Self {
self.doc = doc;
self
}
}
/// `AnalysisHost` stores the current state of the world.
#[derive(Debug, Default)]
pub struct AnalysisHost {