Skip to main content

value_receiver_rewrite

Function value_receiver_rewrite 

Source
pub fn value_receiver_rewrite(
    text: &str,
    callee: &str,
    open_paren: usize,
    cursor: usize,
) -> Option<(String, usize)>
Expand description

For a value-receiver callee recv.method( whose ( is at open_paren, rewrite the buffer so recv is a complete expression (the .method(args dropped) and return it with the receiver byte offset to type — the same mid-edit trick value-member completion uses.