mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-07 11:11:30 +00:00
Use SharedString
for Input
s
This commit is contained in:
parent
5a42ca6772
commit
549e78d7b3
1 changed files with 3 additions and 3 deletions
|
@ -13,17 +13,17 @@ pub enum InputVariant {
|
|||
#[derive(Element)]
|
||||
pub struct Input<S: 'static + Send + Sync> {
|
||||
state_type: PhantomData<S>,
|
||||
placeholder: &'static str,
|
||||
placeholder: SharedString,
|
||||
value: String,
|
||||
state: InteractionState,
|
||||
variant: InputVariant,
|
||||
}
|
||||
|
||||
impl<S: 'static + Send + Sync> Input<S> {
|
||||
pub fn new(placeholder: &'static str) -> Self {
|
||||
pub fn new(placeholder: impl Into<SharedString>) -> Self {
|
||||
Self {
|
||||
state_type: PhantomData,
|
||||
placeholder,
|
||||
placeholder: placeholder.into(),
|
||||
value: "".to_string(),
|
||||
state: InteractionState::default(),
|
||||
variant: InputVariant::default(),
|
||||
|
|
Loading…
Reference in a new issue