Implement Edit for String
This commit is contained in:
parent
b30cde474d
commit
b305b3c693
1 changed files with 8 additions and 0 deletions
|
@ -13,6 +13,14 @@ pub trait Edit {
|
||||||
fn edit_content(&mut self, rt: &Runtime) -> EditResult<()>;
|
fn edit_content(&mut self, rt: &Runtime) -> EditResult<()>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Edit for String {
|
||||||
|
|
||||||
|
fn edit_content(&mut self, rt: &Runtime) -> EditResult<()> {
|
||||||
|
edit_in_tmpfile(rt, self).map(|_| ())
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
impl Edit for Entry {
|
impl Edit for Entry {
|
||||||
|
|
||||||
fn edit_content(&mut self, rt: &Runtime) -> EditResult<()> {
|
fn edit_content(&mut self, rt: &Runtime) -> EditResult<()> {
|
||||||
|
|
Loading…
Reference in a new issue