From f9dd9d242a627a4935b0fa7f15ac7d9ee0c0d82f Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Tue, 12 Oct 2021 12:32:25 +0800 Subject: [PATCH] Edit --- .github/workflows/rust.yml | 2 +- examples/rocket_example/Cargo.toml | 4 ++-- sea-orm-rocket/lib/src/pool.rs | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0b8a6ef0..82d1f6a9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -148,7 +148,7 @@ jobs: with: command: test args: > - --path sea-orm-rocket + --manifest-path sea-orm-rocket/Cargo.toml cli: name: CLI diff --git a/examples/rocket_example/Cargo.toml b/examples/rocket_example/Cargo.toml index a4783cb0..c0834609 100644 --- a/examples/rocket_example/Cargo.toml +++ b/examples/rocket_example/Cargo.toml @@ -27,8 +27,8 @@ features = ["macros", "runtime-tokio-native-tls"] default-features = false [dependencies.sea-orm-rocket] -path = "../../sea-orm-rocket/lib" # remove this line in your own project -git = "https://github.com/SeaQL/sea-orm" +path = "../../sea-orm-rocket/lib" # remove this line in your own project and use the git line +# git = "https://github.com/SeaQL/sea-orm" [features] default = ["sqlx-postgres"] diff --git a/sea-orm-rocket/lib/src/pool.rs b/sea-orm-rocket/lib/src/pool.rs index cbe2bb85..bdd8e638 100644 --- a/sea-orm-rocket/lib/src/pool.rs +++ b/sea-orm-rocket/lib/src/pool.rs @@ -3,8 +3,7 @@ use rocket::figment::Figment; /// Generic [`Database`](crate::Database) driver connection pool trait. /// /// This trait provides a generic interface to various database pooling -/// implementations in the Rust ecosystem. It can be implemented by anyone, but -/// this crate provides implementations for common drivers. +/// implementations in the Rust ecosystem. It can be implemented by anyone. /// /// This is adapted from the original `rocket_db_pools`. But on top we require /// `Connection` itself to be `Sync`. Hence, instead of cloning or allocating @@ -36,7 +35,7 @@ pub trait Pool: Sized + Send + Sync + 'static { /// insufficient resources, or another database-specific error. async fn init(figment: &Figment) -> Result; - /// Borrow a database connection + /// Borrows a reference to the pool fn borrow(&self) -> &Self::Connection; }