chore: make clippy happy in workspace crate
This commit is contained in:
1 parent
22f58ef1d8
commit
8d7d07db56
8 files changed
+62
-60
No files matched your search
@@ -99,7 +99,7 @@ pub(crate) fn NumbericInput<'a>(cx: Scope<'a, NumbericInputProps>) -> Element<'a
|
||||
update(text.clone());
|
||||
};
|
||||
|
||||
render! {
|
||||
cx.render(rsx! {
|
||||
div{
|
||||
width: "{width}",
|
||||
height: "{height}",
|
||||
@@ -120,7 +120,7 @@ pub(crate) fn NumbericInput<'a>(cx: Scope<'a, NumbericInputProps>) -> Element<'a
|
||||
let Point{ x, y } = node.pos().unwrap();
|
||||
|
||||
let Pos { col, row } = cursor.read().start;
|
||||
let (x, y) = (col as u16 + x as u16 + if border == "none" {0} else {1}, row as u16 + y as u16 + if border == "none" {0} else {1});
|
||||
let (x, y) = (col as u16 + x as u16 + u16::from(border != "none"), row as u16 + y as u16 + u16::from(border != "none"));
|
||||
if let Ok(pos) = crossterm::cursor::position() {
|
||||
if pos != (x, y){
|
||||
execute!(stdout(), MoveTo(x, y)).unwrap();
|
||||
@@ -172,7 +172,7 @@ pub(crate) fn NumbericInput<'a>(cx: Scope<'a, NumbericInputProps>) -> Element<'a
|
||||
let Point{ x, y } = node.pos().unwrap();
|
||||
|
||||
let Pos { col, row } = cursor.read().start;
|
||||
let (x, y) = (col as u16 + x as u16 + if border == "none" {0} else {1}, row as u16 + y as u16 + if border == "none" {0} else {1});
|
||||
let (x, y) = (col as u16 + x as u16 + u16::from(border != "none"), row as u16 + y as u16 + u16::from(border != "none"));
|
||||
if let Ok(pos) = crossterm::cursor::position() {
|
||||
if pos != (x, y){
|
||||
execute!(stdout(), MoveTo(x, y)).unwrap();
|
||||
@@ -205,5 +205,5 @@ pub(crate) fn NumbericInput<'a>(cx: Scope<'a, NumbericInputProps>) -> Element<'a
|
||||
|
||||
"{text_after_second_cursor}"
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user