mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Resolve all '#[allow(clippy::redundant_clone)]' error supressions
This commit is contained in:
parent
8d18c2be1f
commit
121d87d87a
@ -202,7 +202,6 @@ impl<'a> Widget for Chat<'a> {
|
||||
|
||||
fn style(&self) -> Self::Style {}
|
||||
|
||||
#[allow(clippy::redundant_clone)] // TODO: Pending review in #587
|
||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
||||
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {
|
||||
common_base::prof_span!("Chat::update");
|
||||
@ -379,11 +378,10 @@ impl<'a> Widget for Chat<'a> {
|
||||
.w(CHAT_BOX_WIDTH)
|
||||
.set(state.ids.chat_input_bg, ui);
|
||||
|
||||
if let Some(str) = text_edit
|
||||
if let Some(mut input) = text_edit
|
||||
.right_from(state.ids.chat_input_icon, 1.0)
|
||||
.set(state.ids.chat_input, ui)
|
||||
{
|
||||
let mut input = str.to_owned();
|
||||
input.retain(|c| c != '\n');
|
||||
if let Ok(()) = validate_chat_msg(&input) {
|
||||
state.update(|s| s.input.message = input);
|
||||
|
Loading…
Reference in New Issue
Block a user