refactor: Enable pedantic clippy lints

Updated files to comply with the new lint.
This commit is contained in:
Gerald Pinder 2024-03-12 18:07:46 -04:00
parent 580c3d6ce7
commit a54b78c8dc
19 changed files with 152 additions and 66 deletions

View file

@ -73,6 +73,7 @@ impl<'a> Module<'a> {
self.get_module_type_list("containerfile", "snippets")
}
#[must_use]
pub fn print_module_context(&'a self) -> String {
serde_json::to_string(self).unwrap_or_else(|e| {
error!("Failed to parse module!!!!!: {e}");
@ -80,6 +81,7 @@ impl<'a> Module<'a> {
})
}
#[must_use]
pub fn get_files_list(&'a self) -> Option<Vec<(String, String)>> {
Some(
self.config

View file

@ -39,6 +39,7 @@ impl ModuleExt<'_> {
)
}
#[must_use]
pub fn get_akmods_info_list(&self, os_version: &str) -> Vec<AkmodsInfo> {
trace!("get_akmods_image_list({self:#?}, {os_version})");

View file

@ -1,7 +1,10 @@
use std::{borrow::Cow, env, fs, path::Path};
use anyhow::Result;
use blue_build_utils::constants::*;
use blue_build_utils::constants::{
CI_COMMIT_REF_NAME, CI_COMMIT_SHORT_SHA, CI_DEFAULT_BRANCH, CI_MERGE_REQUEST_IID,
CI_PIPELINE_SOURCE, GITHUB_EVENT_NAME, GITHUB_REF_NAME, GITHUB_SHA, PR_EVENT_NUMBER,
};
use chrono::Local;
use indexmap::IndexMap;
use log::{debug, trace, warn};