fix: cargo formatting for ci/cd

This commit is contained in:
pandaadir05
2025-11-21 12:52:08 +02:00
parent 2bcfcac407
commit f0606d7835
5 changed files with 57 additions and 49 deletions

View File

@@ -293,9 +293,7 @@ impl LiveThreatFeeds {
indicator.get("type").and_then(|t| t.as_str()),
) {
// Map OTX threat level to our scale
let threat_level = indicator
.get("expiration").map(|_| 4)
.unwrap_or(3);
let threat_level = indicator.get("expiration").map(|_| 4).unwrap_or(3);
iocs.push(CachedIOC {
value: value.to_string(),

View File

@@ -383,11 +383,7 @@ mod platform {
fn proc_pidpath(pid: c_int, buffer: *mut c_void, buffersize: u32) -> c_int;
}
let ret = proc_pidpath(
pid as c_int,
buffer.as_mut_ptr() as *mut c_void,
size,
);
let ret = proc_pidpath(pid as c_int, buffer.as_mut_ptr() as *mut c_void, size);
if ret > 0 {
let path_bytes = &buffer[..ret as usize];

View File

@@ -216,7 +216,8 @@ impl DynamicYaraEngine {
#[cfg(not(feature = "yara-scanning"))]
pub fn compile_rules(&mut self) -> Result<usize, GhostError> {
Err(GhostError::Configuration {
message: "YARA scanning is not enabled. Build with --features yara-scanning to enable.".to_string(),
message: "YARA scanning is not enabled. Build with --features yara-scanning to enable."
.to_string(),
})
}
@@ -330,7 +331,8 @@ impl DynamicYaraEngine {
_memory_regions: &[MemoryRegion],
) -> Result<YaraScanResult, GhostError> {
Err(GhostError::Configuration {
message: "YARA scanning is not enabled. Build with --features yara-scanning to enable.".to_string(),
message: "YARA scanning is not enabled. Build with --features yara-scanning to enable."
.to_string(),
})
}