From 8eaec9f933a0cf1a9ce14337da6bd0564538ba9b Mon Sep 17 00:00:00 2001 From: graelo Date: Mon, 12 Aug 2024 23:52:40 +0200 Subject: [PATCH] fix: obey clippy --- src/tmux.rs | 14 +++++++------- src/ui/vc.rs | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/tmux.rs b/src/tmux.rs index 6346e7d..35c6f27 100644 --- a/src/tmux.rs +++ b/src/tmux.rs @@ -93,13 +93,13 @@ impl Pane { /// is the last line at the bottom of the pane. /// /// - In normal mode, the index of the start line is always 0. The index of - /// the end line is always the pane's height minus one. These do not need to - /// be specified when capturing the pane's content. + /// the end line is always the pane's height minus one. These do not need to + /// be specified when capturing the pane's content. /// - /// - If navigating history in copy mode, the index of the start line is the - /// opposite of the pane's scroll position. For instance a pane of 40 lines, - /// scrolled up by 3 lines. It is necessarily in copy mode. Its start line - /// index is `-3`. The index of the last line is `(40-1) - 3 = 36`. + /// - In normal mode, the index of the start line is always 0. The index of + /// the end line is always the pane's height minus one. These do not need to + /// be specified when capturing the pane's content. + /// index is `-3`. The index of the last line is `(40-1) - 3 = 36`. /// pub fn capture(&self, region: &CaptureRegion) -> Result { let mut args_str = format!("capture-pane -t {pane_id} -J -p", pane_id = self.id); @@ -222,7 +222,7 @@ mod tests { #[test] fn test_parse_pass() { - let output = vec!["%52:false:62:3:false", "%53:false:23::true"]; + let output = ["%52:false:62:3:false", "%53:false:23::true"]; let panes: Result> = output.iter().map(|&line| Pane::from_str(line)).collect(); let panes = panes.expect("Could not parse tmux panes"); diff --git a/src/ui/vc.rs b/src/ui/vc.rs index 6d397fb..cebdd22 100644 --- a/src/ui/vc.rs +++ b/src/ui/vc.rs @@ -27,7 +27,7 @@ use crate::{config::extended::OutputDestination, textbuf}; /// /// - the first `WrappedLine` has `pos_y: 0` and `size: 1` /// - the second `WrappedLine` has `pos_y: 1` and `size: 2` (larger than screen -/// width) +/// width) /// - the third `WrappedLine` has `pos_y: 3` and `size: 1` /// struct WrappedLine {