mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
more enterprisey assists API
This commit is contained in:
parent
aea2183799
commit
a4635a199b
11 changed files with 287 additions and 210 deletions
|
@ -7,15 +7,12 @@ pub struct TextEdit {
|
|||
atoms: Vec<AtomTextEdit>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Default)]
|
||||
pub struct TextEditBuilder {
|
||||
atoms: Vec<AtomTextEdit>,
|
||||
}
|
||||
|
||||
impl TextEditBuilder {
|
||||
pub fn new() -> TextEditBuilder {
|
||||
TextEditBuilder { atoms: Vec::new() }
|
||||
}
|
||||
pub fn replace(&mut self, range: TextRange, replace_with: String) {
|
||||
self.atoms.push(AtomTextEdit::replace(range, replace_with))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue