diff options
Diffstat (limited to 'crates')
24 files changed, 44 insertions, 0 deletions
diff --git a/crates/ide/src/annotations.rs b/crates/ide/src/annotations.rs index 64bc926f1..5ebe7fd0e 100644 --- a/crates/ide/src/annotations.rs +++ b/crates/ide/src/annotations.rs | |||
@@ -19,6 +19,8 @@ use crate::{ | |||
19 | // | 19 | // |
20 | // Provides user with annotations above items for looking up references or impl blocks | 20 | // Provides user with annotations above items for looking up references or impl blocks |
21 | // and running/debugging binaries. | 21 | // and running/debugging binaries. |
22 | // | ||
23 | // image::https://user-images.githubusercontent.com/48062697/113020672-b7c34f00-917a-11eb-8f6e-858735660a0e.png[] | ||
22 | #[derive(Debug)] | 24 | #[derive(Debug)] |
23 | pub struct Annotation { | 25 | pub struct Annotation { |
24 | pub range: TextRange, | 26 | pub range: TextRange, |
diff --git a/crates/ide/src/expand_macro.rs b/crates/ide/src/expand_macro.rs index ffb3a6f7d..9eeabbeda 100644 --- a/crates/ide/src/expand_macro.rs +++ b/crates/ide/src/expand_macro.rs | |||
@@ -23,6 +23,8 @@ pub struct ExpandedMacro { | |||
23 | // | 23 | // |
24 | // | VS Code | **Rust Analyzer: Expand macro recursively** | 24 | // | VS Code | **Rust Analyzer: Expand macro recursively** |
25 | // |=== | 25 | // |=== |
26 | // | ||
27 | // image::https://user-images.githubusercontent.com/48062697/113020648-b3973180-917a-11eb-84a9-ecb921293dc5.gif[] | ||
26 | pub(crate) fn expand_macro(db: &RootDatabase, position: FilePosition) -> Option<ExpandedMacro> { | 28 | pub(crate) fn expand_macro(db: &RootDatabase, position: FilePosition) -> Option<ExpandedMacro> { |
27 | let sema = Semantics::new(db); | 29 | let sema = Semantics::new(db); |
28 | let file = sema.parse(position.file_id); | 30 | let file = sema.parse(position.file_id); |
diff --git a/crates/ide/src/extend_selection.rs b/crates/ide/src/extend_selection.rs index 5201ce587..7032889ac 100644 --- a/crates/ide/src/extend_selection.rs +++ b/crates/ide/src/extend_selection.rs | |||
@@ -24,6 +24,8 @@ use crate::FileRange; | |||
24 | // | 24 | // |
25 | // | VS Code | kbd:[Alt+Shift+→], kbd:[Alt+Shift+←] | 25 | // | VS Code | kbd:[Alt+Shift+→], kbd:[Alt+Shift+←] |
26 | // |=== | 26 | // |=== |
27 | // | ||
28 | // image::https://user-images.githubusercontent.com/48062697/113020651-b42fc800-917a-11eb-8a4f-cf1a07859fac.gif[] | ||
27 | pub(crate) fn extend_selection(db: &RootDatabase, frange: FileRange) -> TextRange { | 29 | pub(crate) fn extend_selection(db: &RootDatabase, frange: FileRange) -> TextRange { |
28 | let sema = Semantics::new(db); | 30 | let sema = Semantics::new(db); |
29 | let src = sema.parse(frange.file_id); | 31 | let src = sema.parse(frange.file_id); |
diff --git a/crates/ide/src/file_structure.rs b/crates/ide/src/file_structure.rs index 2c898eae8..19071d6be 100644 --- a/crates/ide/src/file_structure.rs +++ b/crates/ide/src/file_structure.rs | |||
@@ -35,6 +35,9 @@ pub enum StructureNodeKind { | |||
35 | // | 35 | // |
36 | // | VS Code | kbd:[Ctrl+Shift+O] | 36 | // | VS Code | kbd:[Ctrl+Shift+O] |
37 | // |=== | 37 | // |=== |
38 | // | ||
39 | // image::https://user-images.githubusercontent.com/48062697/113020654-b42fc800-917a-11eb-8388-e7dc4d92b02e.gif[] | ||
40 | |||
38 | pub(crate) fn file_structure(file: &SourceFile) -> Vec<StructureNode> { | 41 | pub(crate) fn file_structure(file: &SourceFile) -> Vec<StructureNode> { |
39 | let mut res = Vec::new(); | 42 | let mut res = Vec::new(); |
40 | let mut stack = Vec::new(); | 43 | let mut stack = Vec::new(); |
diff --git a/crates/ide/src/goto_definition.rs b/crates/ide/src/goto_definition.rs index c6556c487..8574d1e3f 100644 --- a/crates/ide/src/goto_definition.rs +++ b/crates/ide/src/goto_definition.rs | |||
@@ -21,6 +21,8 @@ use crate::{ | |||
21 | // | 21 | // |
22 | // | VS Code | kbd:[F12] | 22 | // | VS Code | kbd:[F12] |
23 | // |=== | 23 | // |=== |
24 | // | ||
25 | // image::https://user-images.githubusercontent.com/48062697/113065563-025fbe00-91b1-11eb-83e4-a5a703610b23.gif[] | ||
24 | pub(crate) fn goto_definition( | 26 | pub(crate) fn goto_definition( |
25 | db: &RootDatabase, | 27 | db: &RootDatabase, |
26 | position: FilePosition, | 28 | position: FilePosition, |
diff --git a/crates/ide/src/goto_implementation.rs b/crates/ide/src/goto_implementation.rs index f4d7c14a6..05130a237 100644 --- a/crates/ide/src/goto_implementation.rs +++ b/crates/ide/src/goto_implementation.rs | |||
@@ -16,6 +16,8 @@ use crate::{display::TryToNav, FilePosition, NavigationTarget, RangeInfo}; | |||
16 | // | 16 | // |
17 | // | VS Code | kbd:[Ctrl+F12] | 17 | // | VS Code | kbd:[Ctrl+F12] |
18 | // |=== | 18 | // |=== |
19 | // | ||
20 | // image::https://user-images.githubusercontent.com/48062697/113065566-02f85480-91b1-11eb-9288-aaad8abd8841.gif[] | ||
19 | pub(crate) fn goto_implementation( | 21 | pub(crate) fn goto_implementation( |
20 | db: &RootDatabase, | 22 | db: &RootDatabase, |
21 | position: FilePosition, | 23 | position: FilePosition, |
diff --git a/crates/ide/src/goto_type_definition.rs b/crates/ide/src/goto_type_definition.rs index 2d38cb112..9d34b109b 100644 --- a/crates/ide/src/goto_type_definition.rs +++ b/crates/ide/src/goto_type_definition.rs | |||
@@ -12,6 +12,8 @@ use crate::{display::TryToNav, FilePosition, NavigationTarget, RangeInfo}; | |||
12 | // | 12 | // |
13 | // | VS Code | **Go to Type Definition* | 13 | // | VS Code | **Go to Type Definition* |
14 | // |=== | 14 | // |=== |
15 | // | ||
16 | // image::https://user-images.githubusercontent.com/48062697/113020657-b560f500-917a-11eb-9007-0f809733a338.gif[] | ||
15 | pub(crate) fn goto_type_definition( | 17 | pub(crate) fn goto_type_definition( |
16 | db: &RootDatabase, | 18 | db: &RootDatabase, |
17 | position: FilePosition, | 19 | position: FilePosition, |
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index 7e35a1450..5f9edb476 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs | |||
@@ -82,6 +82,8 @@ pub struct HoverResult { | |||
82 | // | 82 | // |
83 | // Shows additional information, like type of an expression or documentation for definition when "focusing" code. | 83 | // Shows additional information, like type of an expression or documentation for definition when "focusing" code. |
84 | // Focusing is usually hovering with a mouse, but can also be triggered with a shortcut. | 84 | // Focusing is usually hovering with a mouse, but can also be triggered with a shortcut. |
85 | // | ||
86 | // image::https://user-images.githubusercontent.com/48062697/113020658-b5f98b80-917a-11eb-9f88-3dbc27320c95.gif[] | ||
85 | pub(crate) fn hover( | 87 | pub(crate) fn hover( |
86 | db: &RootDatabase, | 88 | db: &RootDatabase, |
87 | position: FilePosition, | 89 | position: FilePosition, |
diff --git a/crates/ide/src/inlay_hints.rs b/crates/ide/src/inlay_hints.rs index 25f96222c..f73edf8b6 100644 --- a/crates/ide/src/inlay_hints.rs +++ b/crates/ide/src/inlay_hints.rs | |||
@@ -52,6 +52,8 @@ pub struct InlayHint { | |||
52 | // | 52 | // |
53 | // | VS Code | **Rust Analyzer: Toggle inlay hints* | 53 | // | VS Code | **Rust Analyzer: Toggle inlay hints* |
54 | // |=== | 54 | // |=== |
55 | // | ||
56 | // image::https://user-images.githubusercontent.com/48062697/113020660-b5f98b80-917a-11eb-8d70-3be3fd558cdd.png[] | ||
55 | pub(crate) fn inlay_hints( | 57 | pub(crate) fn inlay_hints( |
56 | db: &RootDatabase, | 58 | db: &RootDatabase, |
57 | file_id: FileId, | 59 | file_id: FileId, |
diff --git a/crates/ide/src/join_lines.rs b/crates/ide/src/join_lines.rs index 4b25135cd..d584190f7 100644 --- a/crates/ide/src/join_lines.rs +++ b/crates/ide/src/join_lines.rs | |||
@@ -19,6 +19,8 @@ use text_edit::{TextEdit, TextEditBuilder}; | |||
19 | // | 19 | // |
20 | // | VS Code | **Rust Analyzer: Join lines** | 20 | // | VS Code | **Rust Analyzer: Join lines** |
21 | // |=== | 21 | // |=== |
22 | // | ||
23 | // image::https://user-images.githubusercontent.com/48062697/113020661-b6922200-917a-11eb-87c4-b75acc028f11.gif[] | ||
22 | pub(crate) fn join_lines(file: &SourceFile, range: TextRange) -> TextEdit { | 24 | pub(crate) fn join_lines(file: &SourceFile, range: TextRange) -> TextEdit { |
23 | let range = if range.is_empty() { | 25 | let range = if range.is_empty() { |
24 | let syntax = file.syntax(); | 26 | let syntax = file.syntax(); |
diff --git a/crates/ide/src/matching_brace.rs b/crates/ide/src/matching_brace.rs index 4241a6dac..261dcc255 100644 --- a/crates/ide/src/matching_brace.rs +++ b/crates/ide/src/matching_brace.rs | |||
@@ -14,6 +14,8 @@ use syntax::{ | |||
14 | // | 14 | // |
15 | // | VS Code | **Rust Analyzer: Find matching brace** | 15 | // | VS Code | **Rust Analyzer: Find matching brace** |
16 | // |=== | 16 | // |=== |
17 | // | ||
18 | // image::https://user-images.githubusercontent.com/48062697/113065573-04298180-91b1-11eb-8dec-d4e2a202f304.gif[] | ||
17 | pub(crate) fn matching_brace(file: &SourceFile, offset: TextSize) -> Option<TextSize> { | 19 | pub(crate) fn matching_brace(file: &SourceFile, offset: TextSize) -> Option<TextSize> { |
18 | const BRACES: &[SyntaxKind] = | 20 | const BRACES: &[SyntaxKind] = |
19 | &[T!['{'], T!['}'], T!['['], T![']'], T!['('], T![')'], T![<], T![>], T![|], T![|]]; | 21 | &[T!['{'], T!['}'], T!['['], T![']'], T!['('], T![')'], T![<], T![>], T![|], T![|]]; |
diff --git a/crates/ide/src/move_item.rs b/crates/ide/src/move_item.rs index d36dcd4e4..8d37f4f92 100644 --- a/crates/ide/src/move_item.rs +++ b/crates/ide/src/move_item.rs | |||
@@ -25,6 +25,8 @@ pub enum Direction { | |||
25 | // | VS Code | **Rust Analyzer: Move item up** | 25 | // | VS Code | **Rust Analyzer: Move item up** |
26 | // | VS Code | **Rust Analyzer: Move item down** | 26 | // | VS Code | **Rust Analyzer: Move item down** |
27 | // |=== | 27 | // |=== |
28 | // | ||
29 | // image::https://user-images.githubusercontent.com/48062697/113065576-04298180-91b1-11eb-91ce-4505e99ed598.gif[] | ||
28 | pub(crate) fn move_item( | 30 | pub(crate) fn move_item( |
29 | db: &RootDatabase, | 31 | db: &RootDatabase, |
30 | range: FileRange, | 32 | range: FileRange, |
diff --git a/crates/ide/src/parent_module.rs b/crates/ide/src/parent_module.rs index 22b0d6ecb..99365c8a7 100644 --- a/crates/ide/src/parent_module.rs +++ b/crates/ide/src/parent_module.rs | |||
@@ -18,6 +18,8 @@ use crate::NavigationTarget; | |||
18 | // | 18 | // |
19 | // | VS Code | **Rust Analyzer: Locate parent module** | 19 | // | VS Code | **Rust Analyzer: Locate parent module** |
20 | // |=== | 20 | // |=== |
21 | // | ||
22 | // image::https://user-images.githubusercontent.com/48062697/113065580-04c21800-91b1-11eb-9a32-00086161c0bd.gif[] | ||
21 | 23 | ||
22 | /// This returns `Vec` because a module may be included from several places. | 24 | /// This returns `Vec` because a module may be included from several places. |
23 | pub(crate) fn parent_module(db: &RootDatabase, position: FilePosition) -> Vec<NavigationTarget> { | 25 | pub(crate) fn parent_module(db: &RootDatabase, position: FilePosition) -> Vec<NavigationTarget> { |
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index 95ed8a045..11ca7ec6b 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs | |||
@@ -48,6 +48,8 @@ pub struct Declaration { | |||
48 | // | 48 | // |
49 | // | VS Code | kbd:[Shift+Alt+F12] | 49 | // | VS Code | kbd:[Shift+Alt+F12] |
50 | // |=== | 50 | // |=== |
51 | // | ||
52 | // image::https://user-images.githubusercontent.com/48062697/113020670-b7c34f00-917a-11eb-8003-370ac5f2b3cb.gif[] | ||
51 | pub(crate) fn find_all_refs( | 53 | pub(crate) fn find_all_refs( |
52 | sema: &Semantics<RootDatabase>, | 54 | sema: &Semantics<RootDatabase>, |
53 | position: FilePosition, | 55 | position: FilePosition, |
diff --git a/crates/ide/src/references/rename.rs b/crates/ide/src/references/rename.rs index 98456967a..2408a0181 100644 --- a/crates/ide/src/references/rename.rs +++ b/crates/ide/src/references/rename.rs | |||
@@ -70,6 +70,8 @@ pub(crate) fn prepare_rename( | |||
70 | // | 70 | // |
71 | // | VS Code | kbd:[F2] | 71 | // | VS Code | kbd:[F2] |
72 | // |=== | 72 | // |=== |
73 | // | ||
74 | // image::https://user-images.githubusercontent.com/48062697/113065582-055aae80-91b1-11eb-8ade-2b58e6d81883.gif[] | ||
73 | pub(crate) fn rename( | 75 | pub(crate) fn rename( |
74 | db: &RootDatabase, | 76 | db: &RootDatabase, |
75 | position: FilePosition, | 77 | position: FilePosition, |
diff --git a/crates/ide/src/runnables.rs b/crates/ide/src/runnables.rs index 11bd385bb..3eb9e27ee 100644 --- a/crates/ide/src/runnables.rs +++ b/crates/ide/src/runnables.rs | |||
@@ -98,6 +98,7 @@ impl Runnable { | |||
98 | // | 98 | // |
99 | // | VS Code | **Rust Analyzer: Run** | 99 | // | VS Code | **Rust Analyzer: Run** |
100 | // |=== | 100 | // |=== |
101 | // image::https://user-images.githubusercontent.com/48062697/113065583-055aae80-91b1-11eb-958f-d67efcaf6a2f.gif[] | ||
101 | pub(crate) fn runnables(db: &RootDatabase, file_id: FileId) -> Vec<Runnable> { | 102 | pub(crate) fn runnables(db: &RootDatabase, file_id: FileId) -> Vec<Runnable> { |
102 | let sema = Semantics::new(db); | 103 | let sema = Semantics::new(db); |
103 | 104 | ||
diff --git a/crates/ide/src/status.rs b/crates/ide/src/status.rs index 137c38c0d..49fde1945 100644 --- a/crates/ide/src/status.rs +++ b/crates/ide/src/status.rs | |||
@@ -31,6 +31,7 @@ fn macro_syntax_tree_stats(db: &RootDatabase) -> SyntaxTreeStats { | |||
31 | // | 31 | // |
32 | // | VS Code | **Rust Analyzer: Status** | 32 | // | VS Code | **Rust Analyzer: Status** |
33 | // |=== | 33 | // |=== |
34 | // image::https://user-images.githubusercontent.com/48062697/113065584-05f34500-91b1-11eb-98cc-5c196f76be7f.gif[] | ||
34 | pub(crate) fn status(db: &RootDatabase, file_id: Option<FileId>) -> String { | 35 | pub(crate) fn status(db: &RootDatabase, file_id: Option<FileId>) -> String { |
35 | let mut buf = String::new(); | 36 | let mut buf = String::new(); |
36 | format_to!(buf, "{}\n", FileTextQuery.in_db(db).entries::<FilesStats>()); | 37 | format_to!(buf, "{}\n", FileTextQuery.in_db(db).entries::<FilesStats>()); |
diff --git a/crates/ide/src/syntax_tree.rs b/crates/ide/src/syntax_tree.rs index 8979de528..633878d1c 100644 --- a/crates/ide/src/syntax_tree.rs +++ b/crates/ide/src/syntax_tree.rs | |||
@@ -14,6 +14,7 @@ use syntax::{ | |||
14 | // | 14 | // |
15 | // | VS Code | **Rust Analyzer: Show Syntax Tree** | 15 | // | VS Code | **Rust Analyzer: Show Syntax Tree** |
16 | // |=== | 16 | // |=== |
17 | // image::https://user-images.githubusercontent.com/48062697/113065586-068bdb80-91b1-11eb-9507-fee67f9f45a0.gif[] | ||
17 | pub(crate) fn syntax_tree( | 18 | pub(crate) fn syntax_tree( |
18 | db: &RootDatabase, | 19 | db: &RootDatabase, |
19 | file_id: FileId, | 20 | file_id: FileId, |
diff --git a/crates/ide/src/typing/on_enter.rs b/crates/ide/src/typing/on_enter.rs index 978c479de..9144681bf 100644 --- a/crates/ide/src/typing/on_enter.rs +++ b/crates/ide/src/typing/on_enter.rs | |||
@@ -32,6 +32,8 @@ use text_edit::TextEdit; | |||
32 | // "when": "editorTextFocus && !suggestWidgetVisible && editorLangId == rust" | 32 | // "when": "editorTextFocus && !suggestWidgetVisible && editorLangId == rust" |
33 | // } | 33 | // } |
34 | // ---- | 34 | // ---- |
35 | // | ||
36 | // image::https://user-images.githubusercontent.com/48062697/113065578-04c21800-91b1-11eb-82b8-22b8c481e645.gif[] | ||
35 | pub(crate) fn on_enter(db: &RootDatabase, position: FilePosition) -> Option<TextEdit> { | 37 | pub(crate) fn on_enter(db: &RootDatabase, position: FilePosition) -> Option<TextEdit> { |
36 | let parse = db.parse(position.file_id); | 38 | let parse = db.parse(position.file_id); |
37 | let file = parse.tree(); | 39 | let file = parse.tree(); |
diff --git a/crates/ide/src/view_hir.rs b/crates/ide/src/view_hir.rs index f8f3fae3d..7312afe53 100644 --- a/crates/ide/src/view_hir.rs +++ b/crates/ide/src/view_hir.rs | |||
@@ -10,6 +10,7 @@ use syntax::{algo::find_node_at_offset, ast, AstNode}; | |||
10 | // | 10 | // |
11 | // | VS Code | **Rust Analyzer: View Hir** | 11 | // | VS Code | **Rust Analyzer: View Hir** |
12 | // |=== | 12 | // |=== |
13 | // image::https://user-images.githubusercontent.com/48062697/113065588-068bdb80-91b1-11eb-9a78-0b4ef1e972fb.gif[] | ||
13 | pub(crate) fn view_hir(db: &RootDatabase, position: FilePosition) -> String { | 14 | pub(crate) fn view_hir(db: &RootDatabase, position: FilePosition) -> String { |
14 | body_hir(db, position).unwrap_or_else(|| "Not inside a function body".to_string()) | 15 | body_hir(db, position).unwrap_or_else(|| "Not inside a function body".to_string()) |
15 | } | 16 | } |
diff --git a/crates/ide_assists/src/handlers/auto_import.rs b/crates/ide_assists/src/handlers/auto_import.rs index 7019039b9..5ccd7f7a2 100644 --- a/crates/ide_assists/src/handlers/auto_import.rs +++ b/crates/ide_assists/src/handlers/auto_import.rs | |||
@@ -61,6 +61,8 @@ use crate::{AssistContext, AssistId, AssistKind, Assists, GroupLabel}; | |||
61 | // - `plain`: This setting does not impose any restrictions in imports. | 61 | // - `plain`: This setting does not impose any restrictions in imports. |
62 | // | 62 | // |
63 | // In `VS Code` the configuration for this is `rust-analyzer.assist.importPrefix`. | 63 | // In `VS Code` the configuration for this is `rust-analyzer.assist.importPrefix`. |
64 | // | ||
65 | // image::https://user-images.githubusercontent.com/48062697/113020673-b85be580-917a-11eb-9022-59585f35d4f8.gif[] | ||
64 | 66 | ||
65 | // Assist: auto_import | 67 | // Assist: auto_import |
66 | // | 68 | // |
diff --git a/crates/ide_completion/src/completions/postfix/format_like.rs b/crates/ide_completion/src/completions/postfix/format_like.rs index 3f1c6730b..e86ffa8f8 100644 --- a/crates/ide_completion/src/completions/postfix/format_like.rs +++ b/crates/ide_completion/src/completions/postfix/format_like.rs | |||
@@ -13,6 +13,8 @@ | |||
13 | // + `logi` -> `log::info!(...)` | 13 | // + `logi` -> `log::info!(...)` |
14 | // + `logw` -> `log::warn!(...)` | 14 | // + `logw` -> `log::warn!(...)` |
15 | // + `loge` -> `log::error!(...)` | 15 | // + `loge` -> `log::error!(...)` |
16 | // | ||
17 | // image::https://user-images.githubusercontent.com/48062697/113020656-b560f500-917a-11eb-87de-02991f61beb8.gif[] | ||
16 | 18 | ||
17 | use ide_db::helpers::SnippetCap; | 19 | use ide_db::helpers::SnippetCap; |
18 | use syntax::ast::{self, AstToken}; | 20 | use syntax::ast::{self, AstToken}; |
diff --git a/crates/ide_completion/src/lib.rs b/crates/ide_completion/src/lib.rs index 5ac1cb48d..831d543bb 100644 --- a/crates/ide_completion/src/lib.rs +++ b/crates/ide_completion/src/lib.rs | |||
@@ -81,6 +81,8 @@ pub use crate::{ | |||
81 | // And the auto import completions, enabled with the `rust-analyzer.completion.autoimport.enable` setting and the corresponding LSP client capabilities. | 81 | // And the auto import completions, enabled with the `rust-analyzer.completion.autoimport.enable` setting and the corresponding LSP client capabilities. |
82 | // Those are the additional completion options with automatic `use` import and options from all project importable items, | 82 | // Those are the additional completion options with automatic `use` import and options from all project importable items, |
83 | // fuzzy matched agains the completion imput. | 83 | // fuzzy matched agains the completion imput. |
84 | // | ||
85 | // image::https://user-images.githubusercontent.com/48062697/113020667-b72ab880-917a-11eb-8778-716cf26a0eb3.gif[] | ||
84 | 86 | ||
85 | /// Main entry point for completion. We run completion as a two-phase process. | 87 | /// Main entry point for completion. We run completion as a two-phase process. |
86 | /// | 88 | /// |
diff --git a/crates/ide_db/src/apply_change.rs b/crates/ide_db/src/apply_change.rs index 047a9b6bc..111e9325a 100644 --- a/crates/ide_db/src/apply_change.rs +++ b/crates/ide_db/src/apply_change.rs | |||
@@ -101,6 +101,7 @@ impl RootDatabase { | |||
101 | // | 101 | // |
102 | // | VS Code | **Rust Analyzer: Memory Usage (Clears Database)** | 102 | // | VS Code | **Rust Analyzer: Memory Usage (Clears Database)** |
103 | // |=== | 103 | // |=== |
104 | // image::https://user-images.githubusercontent.com/48062697/113065592-08559f00-91b1-11eb-8c96-64b88068ec02.gif[] | ||
104 | pub fn per_query_memory_usage(&mut self) -> Vec<(String, Bytes)> { | 105 | pub fn per_query_memory_usage(&mut self) -> Vec<(String, Bytes)> { |
105 | let mut acc: Vec<(String, Bytes)> = vec![]; | 106 | let mut acc: Vec<(String, Bytes)> = vec![]; |
106 | let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); | 107 | let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); |