Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plane/src/database/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
pub mod util;

pub async fn connect_and_migrate(db: &str) -> sqlx::Result<PlaneDatabase> {
let db_pool = PgPoolOptions::new().connect(db).await?;
let db_pool = PgPoolOptions::new().max_connections(20).connect(db).await?;
sqlx::migrate!("schema/migrations").run(&db_pool).await?;
Ok(PlaneDatabase::new(db_pool))
}

pub async fn connect(db: &str) -> sqlx::Result<PlaneDatabase> {
let db_pool = PgPoolOptions::new().connect(db).await?;
let db_pool = PgPoolOptions::new().max_connections(20).connect(db).await?;
Ok(PlaneDatabase::new(db_pool))
}

Expand All @@ -56,23 +56,23 @@
}
}

pub fn acme(&self) -> acme::AcmeDatabase {

Check warning on line 59 in plane/src/database/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

hiding a lifetime that's elided elsewhere is confusing

warning: hiding a lifetime that's elided elsewhere is confusing --> plane/src/database/mod.rs:59:17 | 59 | pub fn acme(&self) -> acme::AcmeDatabase { | ^^^^^ ^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default help: use `'_` for type paths | 59 | pub fn acme(&self) -> acme::AcmeDatabase<'_> { | ++++
AcmeDatabase::new(&self.pool)
}

pub fn drone(&self) -> DroneDatabase {

Check warning on line 63 in plane/src/database/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

hiding a lifetime that's elided elsewhere is confusing

warning: hiding a lifetime that's elided elsewhere is confusing --> plane/src/database/mod.rs:63:18 | 63 | pub fn drone(&self) -> DroneDatabase { | ^^^^^ ^^^^^^^^^^^^^ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 63 | pub fn drone(&self) -> DroneDatabase<'_> { | ++++

Check warning on line 63 in plane/src/database/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

hiding a lifetime that's elided elsewhere is confusing

warning: hiding a lifetime that's elided elsewhere is confusing --> plane/src/database/mod.rs:63:18 | 63 | pub fn drone(&self) -> DroneDatabase { | ^^^^^ ^^^^^^^^^^^^^ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 63 | pub fn drone(&self) -> DroneDatabase<'_> { | ++++
DroneDatabase::new(&self.pool)
}

pub fn cluster(&self) -> ClusterDatabase {

Check warning on line 67 in plane/src/database/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

hiding a lifetime that's elided elsewhere is confusing

warning: hiding a lifetime that's elided elsewhere is confusing --> plane/src/database/mod.rs:67:20 | 67 | pub fn cluster(&self) -> ClusterDatabase { | ^^^^^ ^^^^^^^^^^^^^^^ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 67 | pub fn cluster(&self) -> ClusterDatabase<'_> { | ++++

Check warning on line 67 in plane/src/database/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

hiding a lifetime that's elided elsewhere is confusing

warning: hiding a lifetime that's elided elsewhere is confusing --> plane/src/database/mod.rs:67:20 | 67 | pub fn cluster(&self) -> ClusterDatabase { | ^^^^^ ^^^^^^^^^^^^^^^ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 67 | pub fn cluster(&self) -> ClusterDatabase<'_> { | ++++
ClusterDatabase::new(&self.pool)
}

pub fn node(&self) -> NodeDatabase {

Check warning on line 71 in plane/src/database/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

hiding a lifetime that's elided elsewhere is confusing

warning: hiding a lifetime that's elided elsewhere is confusing --> plane/src/database/mod.rs:71:17 | 71 | pub fn node(&self) -> NodeDatabase { | ^^^^^ ^^^^^^^^^^^^ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 71 | pub fn node(&self) -> NodeDatabase<'_> { | ++++

Check warning on line 71 in plane/src/database/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

hiding a lifetime that's elided elsewhere is confusing

warning: hiding a lifetime that's elided elsewhere is confusing --> plane/src/database/mod.rs:71:17 | 71 | pub fn node(&self) -> NodeDatabase { | ^^^^^ ^^^^^^^^^^^^ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 71 | pub fn node(&self) -> NodeDatabase<'_> { | ++++
NodeDatabase::new(&self.pool)
}

pub fn backend(&self) -> BackendDatabase {

Check warning on line 75 in plane/src/database/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

hiding a lifetime that's elided elsewhere is confusing

warning: hiding a lifetime that's elided elsewhere is confusing --> plane/src/database/mod.rs:75:20 | 75 | pub fn backend(&self) -> BackendDatabase { | ^^^^^ ^^^^^^^^^^^^^^^ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 75 | pub fn backend(&self) -> BackendDatabase<'_> { | ++++

Check warning on line 75 in plane/src/database/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

hiding a lifetime that's elided elsewhere is confusing

warning: hiding a lifetime that's elided elsewhere is confusing --> plane/src/database/mod.rs:75:20 | 75 | pub fn backend(&self) -> BackendDatabase { | ^^^^^ ^^^^^^^^^^^^^^^ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 75 | pub fn backend(&self) -> BackendDatabase<'_> { | ++++
BackendDatabase::new(self)
}

Expand All @@ -80,11 +80,11 @@
BackendActionDatabase::new(&self.pool)
}

pub fn keys(&self) -> backend_key::KeysDatabase {

Check warning on line 83 in plane/src/database/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

hiding a lifetime that's elided elsewhere is confusing

warning: hiding a lifetime that's elided elsewhere is confusing --> plane/src/database/mod.rs:83:17 | 83 | pub fn keys(&self) -> backend_key::KeysDatabase { | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 83 | pub fn keys(&self) -> backend_key::KeysDatabase<'_> { | ++++

Check warning on line 83 in plane/src/database/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

hiding a lifetime that's elided elsewhere is confusing

warning: hiding a lifetime that's elided elsewhere is confusing --> plane/src/database/mod.rs:83:17 | 83 | pub fn keys(&self) -> backend_key::KeysDatabase { | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 83 | pub fn keys(&self) -> backend_key::KeysDatabase<'_> { | ++++
KeysDatabase::new(&self.pool)
}

pub fn controller(&self) -> controller::ControllerDatabase {

Check warning on line 87 in plane/src/database/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

hiding a lifetime that's elided elsewhere is confusing

warning: hiding a lifetime that's elided elsewhere is confusing --> plane/src/database/mod.rs:87:23 | 87 | pub fn controller(&self) -> controller::ControllerDatabase { | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 87 | pub fn controller(&self) -> controller::ControllerDatabase<'_> { | ++++

Check warning on line 87 in plane/src/database/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

hiding a lifetime that's elided elsewhere is confusing

warning: hiding a lifetime that's elided elsewhere is confusing --> plane/src/database/mod.rs:87:23 | 87 | pub fn controller(&self) -> controller::ControllerDatabase { | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 87 | pub fn controller(&self) -> controller::ControllerDatabase<'_> { | ++++
ControllerDatabase::new(&self.pool)
}

Expand Down
Loading