diff options
| author | Brooks J Rady <b.j.rady@gmail.com> | 2021-04-13 18:14:13 +0100 |
|---|---|---|
| committer | Brooks J Rady <b.j.rady@gmail.com> | 2021-04-13 18:14:13 +0100 |
| commit | 6f4dcfbf65f522b318ebd359df5658a72b618392 (patch) | |
| tree | d4b1591be1139a4b67d3d4f0b340a133a27ba189 /src/common/utils | |
| parent | fix(ci): unbreak things (diff) | |
| download | sl0ppij-6f4dcfbf65f522b318ebd359df5658a72b618392.tar.gz sl0ppij-6f4dcfbf65f522b318ebd359df5658a72b618392.tar.xz sl0ppij-6f4dcfbf65f522b318ebd359df5658a72b618392.zip | |
fix(clippy): get ci passing again
Diffstat (limited to 'src/common/utils')
| -rw-r--r-- | src/common/utils/logging.rs | 6 | ||||
| -rw-r--r-- | src/common/utils/shared.rs | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/common/utils/logging.rs b/src/common/utils/logging.rs index d08639aa..06827bfc 100644 --- a/src/common/utils/logging.rs +++ b/src/common/utils/logging.rs @@ -47,8 +47,7 @@ pub fn _debug_log_to_file_pid_3(message: String, pid: RawFd) -> io::Result<()> { } } -#[allow(dead_code)] -pub fn delete_log_file() -> io::Result<()> { +pub fn _delete_log_file() -> io::Result<()> { if fs::metadata(ZELLIJ_TMP_LOG_FILE).is_ok() { fs::remove_file(ZELLIJ_TMP_LOG_FILE) } else { @@ -56,8 +55,7 @@ pub fn delete_log_file() -> io::Result<()> { } } -#[allow(dead_code)] -pub fn delete_log_dir() -> io::Result<()> { +pub fn _delete_log_dir() -> io::Result<()> { if fs::metadata(ZELLIJ_TMP_LOG_DIR).is_ok() { fs::remove_dir_all(ZELLIJ_TMP_LOG_DIR) } else { diff --git a/src/common/utils/shared.rs b/src/common/utils/shared.rs index 93892d4f..d5ba943b 100644 --- a/src/common/utils/shared.rs +++ b/src/common/utils/shared.rs @@ -18,9 +18,9 @@ pub fn adjust_to_size(s: &str, rows: usize, columns: usize) -> String { if actual_len > columns { let mut line = String::from(l); line.truncate(columns); - return line; + line } else { - return [l, &str::repeat(" ", columns - ansi_len(l))].concat(); + [l, &str::repeat(" ", columns - ansi_len(l))].concat() } }) .chain(iter::repeat(str::repeat(" ", columns))) |
