add blank lines for readability

This commit is contained in:
Aleksey Kladov 2019-10-26 17:27:47 +03:00
parent e3a253d80f
commit 394e474479
6 changed files with 11 additions and 1 deletions

View file

@ -8,7 +8,9 @@ use ra_syntax::{
use crate::{Assist, AssistCtx, AssistId};
// Assist: add_derive
//
// Adds a new `#[derive()]` clause to a struct or enum.
//
// ```
// struct Point {
// x: u32,

View file

@ -7,7 +7,9 @@ use ra_syntax::{
use crate::{Assist, AssistCtx, AssistId};
// Assist: add_explicit_type
//
// Specify type for a let binding
//
// ```
// fn main() {
// let x<|> = 92;

View file

@ -9,7 +9,9 @@ use ra_syntax::{
use crate::{Assist, AssistCtx, AssistId};
// Assist: add_impl
//
// Adds a new inherent impl for a type
//
// ```
// struct Ctx<T: Clone> {
// data: T,<|>

View file

@ -13,7 +13,9 @@ enum AddMissingImplMembersMode {
}
// Assist: add_impl_missing_members
//
// Adds scaffold for required impl members
//
// ```
// trait T {
// Type X;

View file

@ -5,11 +5,13 @@ use ra_syntax::SyntaxNode;
use crate::{Assist, AssistCtx, AssistId};
// Assist: apply_demorgan
//
// Apply [De Morgan's law](https://en.wikipedia.org/wiki/De_Morgan%27s_laws).
// This transforms expressions of the form `!l || !r` into `!(l && r)`.
// This also works with `&&`. This assist can only be applied with the cursor
// on either `||` or `&&`, with both operands being a negation of some kind.
// This means something of the form `!x` or `x != y`.
//
// ```
// fn main() {
// if x != 4 ||<|> !y {}

View file

@ -51,7 +51,7 @@ fn collect_assists() -> Result<Vec<Assist>> {
id
);
let doc = take_until(lines.by_ref(), "```");
let doc = take_until(lines.by_ref(), "```").trim().to_string();
let before = take_until(lines.by_ref(), "```");
assert_eq!(lines.next().unwrap().as_str(), "->");