diff --git a/.github/copyright.sh b/.github/copyright.sh index c6e3522b9..a22254d65 100644 --- a/.github/copyright.sh +++ b/.github/copyright.sh @@ -7,7 +7,8 @@ # -g "!src/special_directory" # Check all the standard Rust source files -output=$(rg "^// Copyright (19|20)[\d]{2} (.+ and )?the Xilem Authors( and .+)?$\n^// SPDX-License-Identifier: Apache-2\.0$\n\n" --files-without-match --multiline -g "*.rs" .) +# Exclude the Emoji picker example because it also has some MIT licensed content +output=$(rg "^// Copyright (19|20)[\d]{2} (.+ and )?the Xilem Authors( and .+)?$\n^// SPDX-License-Identifier: Apache-2\.0$\n\n" --files-without-match --multiline -g "*.rs" -g "!xilem/examples/emoji_picker.rs" .) if [ -n "$output" ]; then echo -e "The following files lack the correct copyright header:\n" diff --git a/xilem/examples/emoji_picker.rs b/xilem/examples/emoji_picker.rs index e9d0ec97c..61c9f903f 100644 --- a/xilem/examples/emoji_picker.rs +++ b/xilem/examples/emoji_picker.rs @@ -20,11 +20,11 @@ fn app_logic(data: &mut EmojiPagination) -> impl WidgetView { flex(( // TODO: Expose that this is a "zoom out" button accessibly button("🔍-", |data: &mut EmojiPagination| { - data.size = (data.size + 1).min(5) + data.size = (data.size + 1).min(5); }), // TODO: Expose that this is a "zoom in" button accessibly button("🔍+", |data: &mut EmojiPagination| { - data.size = (data.size - 1).max(2) + data.size = (data.size - 1).max(2); }), )) .direction(Axis::Horizontal), @@ -60,7 +60,7 @@ fn picker(data: &mut EmojiPagination) -> impl WidgetView { let view = flex(( // TODO: Expose that this button corresponds to the label below to accessibility? sized_box(button(emoji.display, move |data: &mut EmojiPagination| { - data.last_selected = Some(idx) + data.last_selected = Some(idx); })) .expand_width(), sized_box( @@ -83,7 +83,7 @@ fn picker(data: &mut EmojiPagination) -> impl WidgetView { }; row_contents.push(sized_box(view).width(dimensions).height(dimensions)); } - result.push(flex(row_contents).direction(Axis::Horizontal)) + result.push(flex(row_contents).direction(Axis::Horizontal)); } flex(result) @@ -99,13 +99,13 @@ fn paginate( flex(( // TODO: Expose that this is a previous page button to accessibility button("<-", move |data| { - *data = current_start.saturating_sub(count_per_page) + *data = current_start.saturating_sub(count_per_page); }), label(format!("{percentage}%")), button("->", move |data| { let new_idx = current_start + count_per_page; if new_idx < max_count { - *data = new_idx + *data = new_idx; } }), ))