Align config's API with usage

The config now is mostly immutable, optimize for that.
This commit is contained in:
Aleksey Kladov 2021-01-06 20:43:46 +03:00
parent 7ae4b8bdb6
commit f8a0561178
22 changed files with 164 additions and 162 deletions

View file

@ -113,7 +113,7 @@ mod tests {
use test_utils::mark;
use crate::{
test_utils::{check_edit, check_edit_with_config},
test_utils::{check_edit, check_edit_with_config, TEST_CONFIG},
CompletionConfig,
};
@ -211,7 +211,7 @@ fn main() { S::foo(${1:&self})$0 }
fn suppress_arg_snippets() {
mark::check!(suppress_arg_snippets);
check_edit_with_config(
CompletionConfig { add_call_argument_snippets: false, ..CompletionConfig::default() },
CompletionConfig { add_call_argument_snippets: false, ..TEST_CONFIG },
"with_args",
r#"
fn with_args(x: i32, y: String) {}