make sure to borrow in getters

This commit is contained in:
seth 2024-03-30 03:42:53 -04:00
parent 29ed728fc1
commit 1ff95de3bf
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
9 changed files with 23 additions and 24 deletions

View file

@ -16,17 +16,17 @@ impl Config {
}
pub fn new_from_env() -> Self {
let bot = bot::Config::new_from_env();
let discord = discord::Config::new_from_env();
let bot = bot::Config::from_env();
let discord = discord::Config::from_env();
Self::new(bot, discord)
}
pub fn bot_config(self) -> bot::Config {
self.bot
pub fn bot_config(&self) -> &bot::Config {
&self.bot
}
pub fn discord_config(self) -> discord::Config {
self.discord
pub fn discord_config(&self) -> &discord::Config {
&self.discord
}
}