mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
reformat
This commit is contained in:
parent
f88e0700e6
commit
e096867ada
2 changed files with 3 additions and 2 deletions
|
@ -326,7 +326,9 @@ impl AnalysisImpl {
|
||||||
pub fn doc_text_for(&self, file_id: FileId, symbol: FileSymbol) -> Cancelable<Option<String>> {
|
pub fn doc_text_for(&self, file_id: FileId, symbol: FileSymbol) -> Cancelable<Option<String>> {
|
||||||
let file = self.db.source_file(file_id);
|
let file = self.db.source_file(file_id);
|
||||||
let result = match (symbol.description(&file), symbol.docs(&file)) {
|
let result = match (symbol.description(&file), symbol.docs(&file)) {
|
||||||
(Some(desc), Some(docs)) => Some("```rust\n".to_string() + &*desc + "\n```\n\n" + &*docs),
|
(Some(desc), Some(docs)) => {
|
||||||
|
Some("```rust\n".to_string() + &*desc + "\n```\n\n" + &*docs)
|
||||||
|
}
|
||||||
(Some(desc), None) => Some("```rust\n".to_string() + &*desc + "\n```"),
|
(Some(desc), None) => Some("```rust\n".to_string() + &*desc + "\n```"),
|
||||||
(None, Some(docs)) => Some(docs),
|
(None, Some(docs)) => Some(docs),
|
||||||
_ => None,
|
_ => None,
|
||||||
|
|
|
@ -530,7 +530,6 @@ pub fn handle_hover(
|
||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Test doc comment
|
/// Test doc comment
|
||||||
pub fn handle_prepare_rename(
|
pub fn handle_prepare_rename(
|
||||||
world: ServerWorld,
|
world: ServerWorld,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue