casbin-rs / actix-casbin-auth

Casbin Actix-web access control middleware

Home Page:https://github.com/casbin/casbin-rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

small problems

GopherJ opened this issue · comments

  1. remove the following unwrap

    let enforcer: CachedEnforcer = CachedEnforcer::new(m, a).await.unwrap();

  2. change to sync function, async will has at least 100ns's overhead

    pub async fn get_enforcer(&mut self) -> Arc<RwLock<CachedEnforcer>> {

  3. change to sync function

    pub async fn set_enforcer(e: Arc<RwLock<CachedEnforcer>>) -> Self {

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.60. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Fixed in #19