From 05ff6af8a1a367b2c3cb5c564795c00c4b3db91d Mon Sep 17 00:00:00 2001 From: projectmoon Date: Sat, 3 Oct 2020 20:59:04 +0000 Subject: [PATCH] Inline all config getters. --- src/config.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 2c8dfda..58d0501 100644 --- a/src/config.rs +++ b/src/config.rs @@ -45,16 +45,22 @@ pub struct Config { impl Config { /// The matrix homeserver URL. + #[inline] + #[must_use] pub fn matrix_homeserver(&self) -> &str { &self.matrix.home_server } /// The username used to connect to the matrix server. + #[inline] + #[must_use] pub fn matrix_username(&self) -> &str { &self.matrix.username } /// The password used to connect to the matrix server. + #[inline] + #[must_use] pub fn matrix_password(&self) -> &str { &self.matrix.password } @@ -63,7 +69,9 @@ impl Config { /// be the defined oldest message age in the bot config, if the bot /// configuration and associated "oldest_message_age" setting are /// defined. If the bot config or the message setting are not defined, - /// it will defualt to 15 minutes. + /// it will default to 15 minutes. + #[inline] + #[must_use] pub fn oldest_message_age(&self) -> u64 { self.bot .as_ref()