style: switch rustfmt to hard tabs; document tests-separate rule in TODO
- rustfmt.toml: hard_tabs = true. - TODO §0.7: tests live in tests/, no #[cfg(test)] modules in code files.
This commit is contained in:
parent
d8393e0f39
commit
a90f0da226
96 changed files with 6542 additions and 6537 deletions
|
|
@ -10,11 +10,11 @@ use std::sync::LazyLock;
|
|||
/// Сколько раз событие XDP-ringbuf привело к userspace-авто-бану
|
||||
/// (счётчик инкрементится только на НОВЫЙ бан, не на продление).
|
||||
pub static XDP_AUTOBANS_TOTAL: LazyLock<IntCounter> = LazyLock::new(|| {
|
||||
register_int_counter!("rampart_xdp_autobans_total", "Auto-bans issued from XDP ringbuf events")
|
||||
.expect("XDP_AUTOBANS_TOTAL")
|
||||
register_int_counter!("rampart_xdp_autobans_total", "Auto-bans issued from XDP ringbuf events")
|
||||
.expect("XDP_AUTOBANS_TOTAL")
|
||||
});
|
||||
|
||||
/// Форсирует регистрацию счётчика (для вызова на старте загрузки XDP).
|
||||
pub fn init() {
|
||||
LazyLock::force(&XDP_AUTOBANS_TOTAL);
|
||||
LazyLock::force(&XDP_AUTOBANS_TOTAL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue