mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
modernize even more
This commit is contained in:
parent
f6e8b376d1
commit
28ddecf6c9
12 changed files with 29 additions and 70 deletions
|
@ -1,12 +1,3 @@
|
|||
extern crate itertools;
|
||||
extern crate join_to_string;
|
||||
extern crate ra_syntax;
|
||||
extern crate rustc_hash;
|
||||
extern crate superslice;
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate test_utils as _test_utils;
|
||||
|
||||
mod code_actions;
|
||||
mod edit;
|
||||
mod extend_selection;
|
||||
|
@ -154,7 +145,7 @@ pub fn find_node_at_offset<'a, N: AstNode<'a>>(
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::test_utils::{add_cursor, assert_eq_dbg, extract_offset};
|
||||
use crate::test_utils::{add_cursor, assert_eq_dbg, extract_offset, assert_eq_text};
|
||||
|
||||
#[test]
|
||||
fn test_highlighting() {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
use crate::LocalEdit;
|
||||
pub use crate::_test_utils::*;
|
||||
use ra_syntax::{SourceFileNode, TextRange, TextUnit};
|
||||
|
||||
use crate::LocalEdit;
|
||||
pub use test_utils::*;
|
||||
|
||||
pub fn check_action<F: Fn(&SourceFileNode, TextUnit) -> Option<LocalEdit>>(
|
||||
before: &str,
|
||||
after: &str,
|
||||
|
|
|
@ -238,7 +238,7 @@ fn compute_ws(left: SyntaxNodeRef, right: SyntaxNodeRef) -> &'static str {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::test_utils::{add_cursor, check_action, extract_offset, extract_range};
|
||||
use crate::test_utils::{add_cursor, check_action, extract_offset, extract_range, assert_eq_text};
|
||||
|
||||
fn check_join_lines(before: &str, after: &str) {
|
||||
check_action(before, after, |file, offset| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue