File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -530,12 +530,12 @@ impl App {
530530 }
531531 }
532532
533- fn save_output_to_file ( & self ) -> Result < ( ) > {
533+ fn save_output_to_file ( & mut self ) -> Result < ( ) > {
534534 self . save_output_widget
535535 . save ( & self . output_widget . output . lines . join ( "\n " ) )
536536 }
537537
538- fn save_command_to_file ( & self ) -> Result < ( ) > {
538+ fn save_command_to_file ( & mut self ) -> Result < ( ) > {
539539 self . save_command_widget . save ( & format ! (
540540 "#!/usr/bin/env sh\n \n {}" ,
541541 self . rura_widget. command_input. value( )
Original file line number Diff line number Diff line change @@ -25,12 +25,14 @@ impl SaveToFileWidget {
2525 }
2626 }
2727
28- pub fn save ( & self , content : & str ) -> anyhow:: Result < ( ) > {
28+ pub fn save ( & mut self , content : & str ) -> anyhow:: Result < ( ) > {
2929 let path = PathBuf :: from ( self . file_path_input . value ( ) . trim ( ) ) ;
3030 let mut file = OpenOptions :: new ( ) . create_new ( true ) . write ( true ) . open ( path) ?;
3131
3232 write ! ( file, "{}" , content) ?;
3333
34+ self . error_message = None ;
35+
3436 Ok ( ( ) )
3537 }
3638}
You can’t perform that action at this time.
0 commit comments