Fix lints for Rust 1.89 and bump MSRV to 1.88
This commit is contained in:
parent
88185f9d97
commit
d5cd0a6de9
21 changed files with 360 additions and 395 deletions
|
|
@ -119,10 +119,10 @@ impl Editor {
|
|||
|
||||
let mut text = self.content.text();
|
||||
|
||||
if let Some(ending) = self.content.line_ending() {
|
||||
if !text.ends_with(ending.as_str()) {
|
||||
text.push_str(ending.as_str());
|
||||
}
|
||||
if let Some(ending) = self.content.line_ending()
|
||||
&& !text.ends_with(ending.as_str())
|
||||
{
|
||||
text.push_str(ending.as_str());
|
||||
}
|
||||
|
||||
Task::perform(
|
||||
|
|
|
|||
|
|
@ -71,11 +71,10 @@ impl Example {
|
|||
}
|
||||
}
|
||||
Message::FocusAdjacent(direction) => {
|
||||
if let Some(pane) = self.focus {
|
||||
if let Some(adjacent) = self.panes.adjacent(pane, direction)
|
||||
{
|
||||
self.focus = Some(adjacent);
|
||||
}
|
||||
if let Some(pane) = self.focus
|
||||
&& let Some(adjacent) = self.panes.adjacent(pane, direction)
|
||||
{
|
||||
self.focus = Some(adjacent);
|
||||
}
|
||||
}
|
||||
Message::Clicked(pane) => {
|
||||
|
|
@ -106,14 +105,12 @@ impl Example {
|
|||
}
|
||||
}
|
||||
Message::CloseFocused => {
|
||||
if let Some(pane) = self.focus {
|
||||
if let Some(Pane { is_pinned, .. }) = self.panes.get(pane) {
|
||||
if !is_pinned {
|
||||
if let Some((_, sibling)) = self.panes.close(pane) {
|
||||
self.focus = Some(sibling);
|
||||
}
|
||||
}
|
||||
}
|
||||
if let Some(pane) = self.focus
|
||||
&& let Some(Pane { is_pinned, .. }) = self.panes.get(pane)
|
||||
&& !is_pinned
|
||||
&& let Some((_, sibling)) = self.panes.close(pane)
|
||||
{
|
||||
self.focus = Some(sibling);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
0e355b080ad33905145e9f70a3b29e2481197c8fc8f42491acd5358238ebbd5f
|
||||
99f418007af163f172e163565f166da31015521e1bf7de95fa55cda2fb5a7db5
|
||||
|
|
@ -1 +0,0 @@
|
|||
804a1bb6d49e3b3158463202960447d9e7820b967280f41dd0c34c00d3edf2c3
|
||||
|
|
@ -116,11 +116,11 @@ impl WebSocket {
|
|||
let mut button = button(text("Send").height(40).align_y(Center))
|
||||
.padding([0, 20]);
|
||||
|
||||
if matches!(self.state, State::Connected(_)) {
|
||||
if let Some(message) = echo::Message::new(&self.new_message) {
|
||||
input = input.on_submit(Message::Send(message.clone()));
|
||||
button = button.on_press(Message::Send(message));
|
||||
}
|
||||
if matches!(self.state, State::Connected(_))
|
||||
&& let Some(message) = echo::Message::new(&self.new_message)
|
||||
{
|
||||
input = input.on_submit(Message::Send(message.clone()));
|
||||
button = button.on_press(Message::Send(message));
|
||||
}
|
||||
|
||||
row![input, button].spacing(10).align_y(Center)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue