Repository: gitui-org/gitui (language: rust)

Issue:
Cargo Clippy Fails
**Describe the bug**
When running cargo clippy there is a error that occurs as shown below

**To Reproduce**
Steps to reproduce the behavior:
1. Clone the repo
2. run `rustup update` to make sure you are on the latest version of rust
3. run cargo clippy
4. See error

**Expected behavior**
Cargo clippy passes cleanly

**Screenshots**
![image](https://github.com/extrawurst/gitui/assets/113200622/976347f6-3dad-4e1c-a702-064fbfa03bb9)

**Context (please complete the following information):**
 - OS/Distro: Windows 10
 - GitUI Version 0.25.1
 - Rust version: 1.77


Discussion / hints:

Fix patch:
diff --git a/src/components/textinput.rs b/src/components/textinput.rs
index a92519b31c..0dff6e53c4 100644
--- a/src/components/textinput.rs
+++ b/src/components/textinput.rs
@@ -756,7 +756,7 @@ mod tests {
 		if let Some(ta) = &mut comp.textarea {
 			let txt = ta.lines();
 			assert_eq!(txt[0].len(), 1);
-			assert_eq!(txt[0].as_bytes()[0], 'a' as u8);
+			assert_eq!(txt[0].as_bytes()[0], b'a');
 		}
 	}
 
diff --git a/src/components/utils/filetree.rs b/src/components/utils/filetree.rs
index 73ecfc7490..8b298dbb93 100644
--- a/src/components/utils/filetree.rs
+++ b/src/components/utils/filetree.rs
@@ -404,9 +404,9 @@ mod tests {
 		)
 		.unwrap();
 
-		assert_eq!(res.multiple_items_at_path(0), false);
-		assert_eq!(res.multiple_items_at_path(1), false);
-		assert_eq!(res.multiple_items_at_path(2), true);
+		assert!(!res.multiple_items_at_path(0));
+		assert!(!res.multiple_items_at_path(1));
+		assert!(res.multiple_items_at_path(2));
 	}
 
 	#[test]
diff --git a/src/components/utils/statustree.rs b/src/components/utils/statustree.rs
index 4b3384d7b7..59c2b15489 100644
--- a/src/components/utils/statustree.rs
+++ b/src/components/utils/statustree.rs
@@ -509,10 +509,7 @@ mod tests {
 				false, //
 			]
 		);
-		assert_eq!(
-			res.is_visible_index(res.selection.unwrap()),
-			true
-		);
+		assert!(res.is_visible_index(res.selection.unwrap()));
 		assert_eq!(res.selection, Some(0));
 	}
 
diff --git a/src/popups/blame_file.rs b/src/popups/blame_file.rs
index af2fdb90e1..b3742475f9 100644
--- a/src/popups/blame_file.rs
+++ b/src/popups/blame_file.rs
@@ -197,8 +197,7 @@ impl Component for BlameFilePopup {
 		let has_result = self
 			.blame
 			.as_ref()
-			.map(|blame| blame.result().is_some())
-			.unwrap_or_default();
+			.is_some_and(|blame| blame.result().is_some());
 		if self.is_visible() || force_all {
 			out.push(
 				CommandInfo::new(
diff --git a/src/ui/reflow.rs b/src/ui/reflow.rs
index 8b9c3cde30..6255de4e97 100644
--- a/src/ui/reflow.rs
+++ b/src/ui/reflow.rs
@@ -445,7 +445,7 @@ mod test {
 				"mnopab cdefghi j",
 				"klmno",
 			]
-		)
+		);
 	}
 
 	#[test]


Test patch: