Merge pull request #323 from matthiasbeyer/libimagrt/edit-for-string
Implement Edit for String
This commit is contained in:
commit
db82a121c4
1 changed files with 8 additions and 0 deletions
|
@ -13,6 +13,14 @@ pub trait Edit {
|
|||
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 {
|
||||
|
||||
fn edit_content(&mut self, rt: &Runtime) -> EditResult<()> {
|
||||
|
|
Loading…
Reference in a new issue