tg-rs / carapax

A Telegram Bot API framework
MIT License
113 stars 12 forks source link

add pub access for Ref data #80

Closed sa68ru closed 3 months ago

sa68ru commented 3 months ago

Allows use data from Ref via pattern match syntax

async fn example(db: Ref<sea_orm::DatabaseConnection>) -> Result<(), AppError> {
  ...
  .exec(&*db).await?;
  ...
}
async fn example(Ref(db): Ref<sea_orm::DatabaseConnection>) -> Result<(), AppError> {
  ...
  .exec(&db).await?;
  ...
}