aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
authorZJPzjp2023-05-11 05:44:52 +0000
committerGitHub2023-05-11 05:44:52 +0000
commit3b8c15618f51889ffd2f2f4be32f8404c1517956 (patch)
treee3083a28d98fe1faf45fc37b9bdd28340fd6186e /helix-view/src
parent1e5997dc98ecd82b09ccee9fbe8d5350fd333fad (diff)
Fix warnings from clippy (#7013)
* Fix warnings from clippy * revert MAIN_SEPARATOR_STR
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/clipboard.rs2
-rw-r--r--helix-view/src/tree.rs3
2 files changed, 2 insertions, 3 deletions
diff --git a/helix-view/src/clipboard.rs b/helix-view/src/clipboard.rs
index d43d632a..d639902f 100644
--- a/helix-view/src/clipboard.rs
+++ b/helix-view/src/clipboard.rs
@@ -68,7 +68,7 @@ macro_rules! command_provider {
#[cfg(windows)]
pub fn get_clipboard_provider() -> Box<dyn ClipboardProvider> {
- Box::new(provider::WindowsProvider::default())
+ Box::<provider::WindowsProvider>::default()
}
#[cfg(target_os = "macos")]
diff --git a/helix-view/src/tree.rs b/helix-view/src/tree.rs
index e8afd204..4c9eba0f 100644
--- a/helix-view/src/tree.rs
+++ b/helix-view/src/tree.rs
@@ -728,12 +728,11 @@ mod test {
tree.focus = l0;
let view = View::new(DocumentId::default(), GutterConfig::default());
tree.split(view, Layout::Vertical);
- let l2 = tree.focus;
// Tree in test
// | L0 | L2 | |
// | L1 | R0 |
- tree.focus = l2;
+ let l2 = tree.focus;
assert_eq!(Some(l0), tree.find_split_in_direction(l2, Direction::Left));
assert_eq!(Some(l1), tree.find_split_in_direction(l2, Direction::Down));
assert_eq!(Some(r0), tree.find_split_in_direction(l2, Direction::Right));