fix #265: resolve all remaining clippy warnings (cast, too_many_lines, doc nits)

This commit is contained in:
damocles 2026-05-22 19:02:11 +02:00
commit 484cea62c7
12 changed files with 95 additions and 86 deletions

View file

@ -198,6 +198,7 @@ pub fn rate_limit_sleep_secs() -> u64 {
/// 1. `HIVE_AUTO_RESET_WATERMARK_TOKENS` env var (explicit override).
/// 2. 50% of the model's context window (derived from `bus.model()` +
/// `events::context_window_tokens`).
///
/// `0` disables auto-reset entirely.
fn auto_reset_watermark_tokens(bus: &Bus) -> u64 {
if let Some(v) = std::env::var("HIVE_AUTO_RESET_WATERMARK_TOKENS")
@ -223,6 +224,7 @@ fn cache_ttl_secs() -> u64 {
/// 1. `HIVE_COMPACT_WATERMARK_TOKENS` env var (explicit override).
/// 2. 75% of the model's context window (derived from `bus.model()` +
/// `events::context_window_tokens`).
///
/// `0` disables proactive compaction (reactive path still applies).
fn compact_watermark_tokens(bus: &Bus) -> u64 {
if let Some(v) = std::env::var("HIVE_COMPACT_WATERMARK_TOKENS")