Skip to content

Commit

Permalink
#105 Use Arc under thread-safe
Browse files Browse the repository at this point in the history
  • Loading branch information
tyt2y3 committed Aug 15, 2021
1 parent 696ca5c commit 8170a1d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ rusqlite = []
sqlx-mysql = []
sqlx-postgres = []
sqlx-sqlite = []
thread-safe = []
with-chrono = ["chrono"]
with-json = ["serde_json"]
with-rust_decimal = ["rust_decimal"]
Expand Down
6 changes: 5 additions & 1 deletion src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
use crate::{expr::*, query::*};
use std::fmt;
pub use std::rc::Rc as SeaRc; // in case we some day we want to use Arc instead of Rc

#[cfg(feature = "thread-safe")]
pub use std::sync::Arc as SeaRc;
#[cfg(not(feature = "thread-safe"))]
pub use std::rc::Rc as SeaRc;

/// Identifier in query
pub trait Iden {
Expand Down

0 comments on commit 8170a1d

Please sign in to comment.