mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-12-17 12:51:26 -05:00
inline analysis and symbol reduction; emits smaller than 64 bytes marked inline
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
1e8b8cce0f
commit
eeda96d94a
35 changed files with 117 additions and 73 deletions
|
|
@ -48,10 +48,12 @@ impl Data {
|
|||
}))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(super) fn is_disabled(&self, room_id: &RoomId) -> Result<bool> {
|
||||
Ok(self.disabledroomids.get(room_id.as_bytes())?.is_some())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(super) fn disable_room(&self, room_id: &RoomId, disabled: bool) -> Result<()> {
|
||||
if disabled {
|
||||
self.disabledroomids.insert(room_id.as_bytes(), &[])?;
|
||||
|
|
@ -62,10 +64,12 @@ impl Data {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(super) fn is_banned(&self, room_id: &RoomId) -> Result<bool> {
|
||||
Ok(self.bannedroomids.get(room_id.as_bytes())?.is_some())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(super) fn ban_room(&self, room_id: &RoomId, banned: bool) -> Result<()> {
|
||||
if banned {
|
||||
self.bannedroomids.insert(room_id.as_bytes(), &[])?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue