Skip to content

Commit

Permalink
Edit
Browse files Browse the repository at this point in the history
  • Loading branch information
tyt2y3 committed Oct 12, 2021
1 parent e579759 commit f9dd9d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
with:
command: test
args: >
--path sea-orm-rocket
--manifest-path sea-orm-rocket/Cargo.toml
cli:
name: CLI
Expand Down
4 changes: 2 additions & 2 deletions examples/rocket_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
5 changes: 2 additions & 3 deletions sea-orm-rocket/lib/src/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -36,7 +35,7 @@ pub trait Pool: Sized + Send + Sync + 'static {
/// insufficient resources, or another database-specific error.
async fn init(figment: &Figment) -> Result<Self, Self::Error>;

/// Borrow a database connection
/// Borrows a reference to the pool
fn borrow(&self) -> &Self::Connection;
}

Expand Down

0 comments on commit f9dd9d2

Please sign in to comment.