File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -32,17 +32,17 @@ impl Show for CopyToClipboardExample {
3232                    . context_menu ( |ui| { 
3333                        let  pointer = context. pointer ( ) . to_json_pointer_string ( ) ; 
3434                        if  !pointer. is_empty ( )  && ui. button ( "Copy path" ) . clicked ( )  { 
35-                             ui. output_mut ( |o | { 
35+                             ui. output_mut ( |_ | { 
3636                                println ! ( "{}" ,  pointer) ; 
37-                                 o . copied_text  =  pointer; 
37+                                 ui . ctx ( ) . copy_text ( pointer) ; 
3838                            } ) ; 
3939                            ui. close_menu ( ) ; 
4040                        } 
4141
4242                        if  ui. button ( "Copy contents" ) . clicked ( )  { 
4343                            if  let  Ok ( pretty_str)  = serde_json:: to_string_pretty ( context. value ( ) )  { 
4444                                println ! ( "{}" ,  pretty_str) ; 
45-                                 ui. output_mut ( |o| o . copied_text  =  pretty_str) ; 
45+                                 ui. output_mut ( |_| ui . ctx ( ) . copy_text ( pretty_str) ) ; 
4646                            } 
4747                            ui. close_menu ( ) ; 
4848                        } 
Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ impl Editor {
300300    fn  show_text_edit_with_focus ( ui :  & mut  Ui ,  input :  & mut  String ,  request_focus :  & mut  bool )  { 
301301        let  text_edit_output = TextEdit :: singleline ( input) 
302302            . code_editor ( ) 
303-             . margin ( Margin :: symmetric ( 2.0  ,   0. 0) ) 
303+             . margin ( Margin :: symmetric ( 2 ,   0 ) ) 
304304            . clip_text ( false ) 
305305            . desired_width ( 0.0 ) 
306306            . min_size ( vec2 ( 10.0 ,  2.0 ) ) 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments