Clean up Picker constructor signature (#9500)

This PR cleans up the (internal) `Picker` constructor signature, mainly
to remove the consecutive boolean parameters.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-03-18 12:27:51 -04:00 committed by GitHub
parent 98111c3b00
commit c116a7ca5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 50 additions and 34 deletions

View file

@ -16,8 +16,8 @@ pub(crate) enum Head {
impl Head {
pub fn editor<V: 'static>(
placeholder_text: Arc<str>,
cx: &mut ViewContext<V>,
edit_handler: impl FnMut(&mut V, View<Editor>, &EditorEvent, &mut ViewContext<'_, V>) + 'static,
cx: &mut ViewContext<V>,
) -> Self {
let editor = cx.new_view(|cx| {
let mut editor = Editor::single_line(cx);