From e48d2344359a40a5bd437a8232704505f3914de3 Mon Sep 17 00:00:00 2001 From: Chetan baliyan Date: Sun, 15 Dec 2024 20:57:46 +0530 Subject: [PATCH] style: fix formatting in cursor tests --- crates/nu-explore/src/views/cursor/mod.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/nu-explore/src/views/cursor/mod.rs b/crates/nu-explore/src/views/cursor/mod.rs index 7c260af197..638b979897 100644 --- a/crates/nu-explore/src/views/cursor/mod.rs +++ b/crates/nu-explore/src/views/cursor/mod.rs @@ -124,14 +124,13 @@ mod tests { #[test] fn test_cursor_size_zero_handling() { - let cursor = Cursor::new(0); assert_eq!(cursor.end(), 0); - + let mut cursor = Cursor::new(0); - cursor.move_forward(1); + cursor.move_forward(1); assert_eq!(cursor.position, 0); - + cursor.move_backward(1); assert_eq!(cursor.position, 0); } @@ -140,9 +139,8 @@ mod tests { fn test_cursor_size_one() { let mut cursor = Cursor::new(1); assert_eq!(cursor.end(), 0); - + cursor.move_forward(1); assert_eq!(cursor.position, 0); } - }