Skip to content

Commit cc33b0d

Browse files
committed
Update the docs
1 parent 6031dee commit cc33b0d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

crates/ide_assists/src/handlers/sort_items.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ use crate::{utils::get_methods, AssistContext, AssistId, AssistKind, Assists};
1414
// Sorts item members alphabetically: fields, enum variants and methods.
1515
//
1616
// ```
17-
// struct $0Foo { second: u32, first: String }
17+
// struct $0Foo$0 { second: u32, first: String }
1818
// ```
1919
// ->
2020
// ```
2121
// struct Foo { first: String, second: u32 }
2222
// ```
2323
// ---
2424
// ```
25-
// trait $0Bar {
25+
// trait $0Bar$0 {
2626
// fn second(&self) -> u32;
2727
// fn first(&self) -> String;
2828
// }
@@ -37,7 +37,7 @@ use crate::{utils::get_methods, AssistContext, AssistId, AssistKind, Assists};
3737
// ---
3838
// ```
3939
// struct Baz;
40-
// impl $0Baz {
40+
// impl $0Baz$0 {
4141
// fn second(&self) -> u32;
4242
// fn first(&self) -> String;
4343
// }
@@ -54,7 +54,7 @@ use crate::{utils::get_methods, AssistContext, AssistId, AssistKind, Assists};
5454
// There is a difference between sorting enum variants:
5555
//
5656
// ```
57-
// en$0um Animal {
57+
// enum $0Animal$0 {
5858
// Dog(String, f64),
5959
// Cat { weight: f64, name: String },
6060
// }
@@ -71,7 +71,7 @@ use crate::{utils::get_methods, AssistContext, AssistId, AssistKind, Assists};
7171
// ```
7272
// enum Animal {
7373
// Dog(String, f64),
74-
// Cat {$0 weight: f64, name: String },
74+
// Cat $0{ weight: f64, name: String }$0,
7575
// }
7676
// ```
7777
// ->

crates/ide_assists/src/tests/generated.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,7 @@ fn doctest_sort_items() {
15281528
check_doc_test(
15291529
"sort_items",
15301530
r#####"
1531-
struct $0Foo { second: u32, first: String }
1531+
struct $0Foo$0 { second: u32, first: String }
15321532
"#####,
15331533
r#####"
15341534
struct Foo { first: String, second: u32 }
@@ -1541,7 +1541,7 @@ fn doctest_sort_items_1() {
15411541
check_doc_test(
15421542
"sort_items",
15431543
r#####"
1544-
trait $0Bar {
1544+
trait $0Bar$0 {
15451545
fn second(&self) -> u32;
15461546
fn first(&self) -> String;
15471547
}
@@ -1561,7 +1561,7 @@ fn doctest_sort_items_2() {
15611561
"sort_items",
15621562
r#####"
15631563
struct Baz;
1564-
impl $0Baz {
1564+
impl $0Baz$0 {
15651565
fn second(&self) -> u32;
15661566
fn first(&self) -> String;
15671567
}
@@ -1581,7 +1581,7 @@ fn doctest_sort_items_3() {
15811581
check_doc_test(
15821582
"sort_items",
15831583
r#####"
1584-
en$0um Animal {
1584+
enum $0Animal$0 {
15851585
Dog(String, f64),
15861586
Cat { weight: f64, name: String },
15871587
}
@@ -1602,7 +1602,7 @@ fn doctest_sort_items_4() {
16021602
r#####"
16031603
enum Animal {
16041604
Dog(String, f64),
1605-
Cat {$0 weight: f64, name: String },
1605+
Cat $0{ weight: f64, name: String }$0,
16061606
}
16071607
"#####,
16081608
r#####"

0 commit comments

Comments
 (0)