From 1d030ca84035f73901dff7537bcae2aa27f9d259 Mon Sep 17 00:00:00 2001 From: shibedrill <53824200+shibedrill@users.noreply.github.com> Date: Fri, 3 Nov 2023 14:27:22 -0400 Subject: [PATCH] Fixed warnings, minor refactoring --- .Cargo.toml.kate-swp | Bin 77 -> 0 bytes Cargo.lock | 2 +- Cargo.toml | 12 +++++++++++- README.md | 2 +- src/main.rs | 2 +- src/terminal.rs | 1 + 6 files changed, 15 insertions(+), 4 deletions(-) delete mode 100644 .Cargo.toml.kate-swp diff --git a/.Cargo.toml.kate-swp b/.Cargo.toml.kate-swp deleted file mode 100644 index 83e6eaa5b7dfb8fc15a024bd3cd170798c44d87b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 zcmZQzU=Z?7EJ;-eE>A2_aLdd|RWQ;sU|?Vn+3r5$t-bvYudn%eT!Qz%Y<-t7%Of}l UD8mfI{6H+=8tjS0Wi)jK08@t&lmGw# diff --git a/Cargo.lock b/Cargo.lock index f15a57a..cd0ac11 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -333,7 +333,7 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "oxidefetch" -version = "1.4.4" +version = "1.4.5" dependencies = [ "byte-unit", "chrono", diff --git a/Cargo.toml b/Cargo.toml index b74798e..27c4d34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,11 @@ [package] name = "oxidefetch" description = "A fast, cross platform Fetch program for your terminal" -version = "1.4.4" +version = "1.4.5" edition = "2021" authors = [ "NamedNeon", "shibedrill" ] license = "MIT" +readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -27,3 +28,12 @@ panic = "abort" [features] field-titles = [] + +[package.metadata.rpm] +package = "oxidefetch" + +[package.metadata.rpm.cargo] +buildflags = ["--release"] + +[package.metadata.rpm.targets] +oxidefetch = { path = "/usr/bin/oxidefetch" } diff --git a/README.md b/README.md index 7515cc4..59c9000 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ No weird quirks to report at this time. **1.4.2:** Updated colors and logos of a few distros. They will now display correctly. **1.4.3:** Removed newline print before information. This should be up to the user to print, using their shell profile. **1.4.4:** Fixed an issue where GPUs would all print on one line. -**1.4.5:** Minor changes to system color detection. +**1.4.5:** Minor changes to system color detection. Removed all warnings. ### License This software is covered by the MIT license. See license.txt for details. diff --git a/src/main.rs b/src/main.rs index 9b97683..da28ef8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -70,10 +70,10 @@ fn main() { } } - //color_print("GPU:\t", '', &sys_info.gpu, "bright green"); color_print("Memory:\t", '󰍛', &Some(sys_info.memory), "bright blue"); } +#[allow(unused_variables)] // The field title var is sometimes unused due to compile time features fn color_print(field_title: &str, icon: char, field: &Option, color: &str) { // If the field is missing, it won't print. if field.is_some() { diff --git a/src/terminal.rs b/src/terminal.rs index 658ed70..4007168 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -84,6 +84,7 @@ pub fn get_terminal() -> Option { }; let shell_name = shell.split("/").last().unwrap(); + #[allow(unused_assignments)] let mut name: Option = None; let mut self_hosted = false;