Fixed warnings, minor refactoring

This commit is contained in:
shibedrill 2023-11-03 14:27:22 -04:00
parent e9c2621084
commit 1d030ca840
6 changed files with 15 additions and 4 deletions

Binary file not shown.

2
Cargo.lock generated
View File

@ -333,7 +333,7 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
[[package]]
name = "oxidefetch"
version = "1.4.4"
version = "1.4.5"
dependencies = [
"byte-unit",
"chrono",

View File

@ -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" }

View File

@ -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.

View File

@ -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<String>, color: &str) {
// If the field is missing, it won't print.
if field.is_some() {

View File

@ -84,6 +84,7 @@ pub fn get_terminal() -> Option<String> {
};
let shell_name = shell.split("/").last().unwrap();
#[allow(unused_assignments)]
let mut name: Option<String> = None;
let mut self_hosted = false;