refactor(ratelimit): Return Duration from Ratelimit functions

- `Ratelimit` is rather a low-level Rust tool, so it should only use `Duration` and `SystemTime`.
- Rename `Ratelimit::update_interval()` to `min_send_interval()`, the word "update" only occurs in
  `last_update`, but it's a private field.
This commit is contained in:
iequidoo
2025-03-28 22:55:36 -03:00
parent a8f8d34c25
commit 621eabfce3
4 changed files with 19 additions and 9 deletions

View File

@@ -60,7 +60,7 @@ impl WebxdcMessageInfo {
request_integration: _,
internet_access,
self_addr,
send_update_interval,
send_update_interval_ms,
send_update_max_size,
} = message.get_webxdc_info(context).await?;
@@ -72,7 +72,7 @@ impl WebxdcMessageInfo {
source_code_url: maybe_empty_string_to_option(source_code_url),
internet_access,
self_addr,
send_update_interval,
send_update_interval: send_update_interval_ms,
send_update_max_size,
})
}