mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 18:36:30 +03:00
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:
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user