Slightly better name

This commit is contained in:
Aleksey Kladov 2020-06-23 21:29:50 +02:00
parent 9caf810129
commit ff687453a8
4 changed files with 9 additions and 9 deletions

View file

@ -26,7 +26,7 @@ use ra_project_model::TargetKind;
use ra_syntax::{AstNode, SyntaxKind, TextRange, TextSize};
use serde::{Deserialize, Serialize};
use serde_json::to_value;
use stdx::{format_to, split1};
use stdx::{format_to, split_delim};
use crate::{
cargo_target_spec::CargoTargetSpec,
@ -785,7 +785,7 @@ pub fn handle_resolve_code_action(
let frange = FileRange { file_id, range };
let assists = snap.analysis().resolved_assists(&snap.config.assist, frange)?;
let (id_string, index) = split1(&params.id, ':').unwrap();
let (id_string, index) = split_delim(&params.id, ':').unwrap();
let index = index.parse::<usize>().unwrap();
let assist = &assists[index];
assert!(assist.assist.id.0 == id_string);