mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-08-04 19:08:32 +00:00
adopt salsa::database
attribute macro
This commit is contained in:
parent
3fc02c6c0c
commit
a8d9fb2d6b
13 changed files with 55 additions and 159 deletions
|
@ -1,3 +1,4 @@
|
|||
#[salsa::database(Database)]
|
||||
#[derive(Default)]
|
||||
struct DatabaseImpl {
|
||||
runtime: salsa::Runtime<DatabaseImpl>,
|
||||
|
@ -9,12 +10,6 @@ impl salsa::Database for DatabaseImpl {
|
|||
}
|
||||
}
|
||||
|
||||
salsa::database_storage! {
|
||||
DatabaseImpl {
|
||||
impl Database;
|
||||
}
|
||||
}
|
||||
|
||||
#[salsa::query_group]
|
||||
trait Database: salsa::Database {
|
||||
// `a` and `b` depend on each other and form a cycle
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue