api!(location): avoid repeating module name in function names

E.g. rename location::is_sending_locations_to_chat to location::is_sending_to_chat.
Then import only the location module and use it with location:: prefix,
similarly to how e.g. std::fs or std::tokio::fs avoids using "fs" or "file"
in function names.
This commit is contained in:
link2xt
2026-04-26 22:48:26 +02:00
committed by l
parent 8c927c7f86
commit 73e8bee120
8 changed files with 33 additions and 52 deletions

View File

@@ -23,7 +23,6 @@ use tokio::time::{Duration, sleep};
use crate::context::{Context, ContextBuilder};
use crate::events::{Event, EventEmitter, EventType, Events};
use crate::location;
use crate::location::stop_sending_locations;
use crate::log::warn;
use crate::push::PushSubscriber;
use crate::stock_str::StockStrings;
@@ -555,7 +554,7 @@ impl Accounts {
/// Stops sending locations to all chats.
pub async fn stop_sending_locations(&self) -> Result<()> {
for account in self.accounts.values() {
stop_sending_locations(account).await?;
location::stop_sending(account).await?;
}
Ok(())
}