Skip to content

Commit f0218a6

Browse files
committed
helper-rust: fix build
1 parent 0fdda50 commit f0218a6

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

appsec/helper-rust/src/client/metrics.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ impl WafMetrics {
132132
self.request_blocked = true;
133133
}
134134
}
135-
136135
}
137136
trait RunOutputExt {
138137
fn has_events(&self) -> bool;

appsec/helper-rust/src/rc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ mod tests {
703703

704704
assert_eq!(got.len(), 2);
705705
// Order should match insertion
706-
assert_eq!(got[0].0, rc1_path);
706+
assert_eq!(got[0].0.as_str(), rc1_path);
707707
#[cfg(target_os = "macos")]
708708
{
709709
// On macOS, fstat() returns padded size (16KB min), so compare only the actual content
@@ -713,7 +713,7 @@ mod tests {
713713
{
714714
assert_eq!(got[0].1, inner1_content);
715715
}
716-
assert_eq!(got[1].0, rc2_path);
716+
assert_eq!(got[1].0.as_str(), rc2_path);
717717
#[cfg(target_os = "macos")]
718718
{
719719
assert_eq!(&got[1].1[..inner2_content.len()], inner2_content);

appsec/helper-rust/src/service/metrics.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
use std::sync::atomic::{AtomicU64, Ordering};
22

3-
use crate::{client::log::warning, error_once, telemetry::{self, TelemetryMetricSubmitter, TelemetryMetricsGenerator, TelemetryTags}};
3+
use crate::{
4+
error_once,
5+
telemetry::{self, TelemetryMetricSubmitter, TelemetryMetricsGenerator, TelemetryTags},
6+
};
47

58
#[derive(Debug, Default)]
69
pub struct WorkerCountState {

appsec/helper-rust/src/service/updateable_waf.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ mod tests {
294294
.replace("arachni_rule", "inhcara_rule"),
295295
)
296296
.unwrap();
297-
upd_waf.add_or_update_config("2nd rule", &ruleset2, None);
297+
upd_waf
298+
.add_or_update_config("2nd rule", &ruleset2, None)
299+
.unwrap();
298300

299301
assert_eq!(upd_waf.config_paths_count(Some("2nd rule")), 1);
300302
let paths = upd_waf.config_paths(Some("2nd rule"));

0 commit comments

Comments
 (0)