ui2: Unsuppress and fix warnings (#3423)

This PR unsupresses the warnings in `ui2` and summarily fixes them.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2023-11-28 14:44:19 -05:00 committed by GitHub
parent 874fde09ab
commit 070674a4fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 46 additions and 93 deletions

View file

@ -10,11 +10,11 @@ fn build_menu(cx: &mut WindowContext, header: impl Into<SharedString>) -> View<C
ContextMenu::build(cx, |menu, _| {
menu.header(header)
.separator()
.entry("Print current time", |v, cx| {
.entry("Print current time", |_event, cx| {
println!("dispatching PrintCurrentTime action");
cx.dispatch_action(PrintCurrentDate.boxed_clone())
})
.entry("Print best foot", |v, cx| {
.entry("Print best foot", |_event, cx| {
cx.dispatch_action(PrintBestFood.boxed_clone())
})
})
@ -25,7 +25,7 @@ pub struct ContextMenuStory;
impl Render for ContextMenuStory {
type Element = Div;
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
fn render(&mut self, _cx: &mut ViewContext<Self>) -> Self::Element {
Story::container()
.on_action(|_: &PrintCurrentDate, _| {
println!("printing unix time!");