Skip to content

Commit 941e203

Browse files
committed
fix tests
1 parent 1537a38 commit 941e203

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/demo/src/apps/copy_to_clipboard.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

examples/demo/src/apps/editor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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))

0 commit comments

Comments
 (0)