Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ jobs:
- name: Rust cache
uses: Swatinem/rust-cache@v2.7.3

- name: Lints (compat-3-0-0)
- name: Lints (bson 2)
run: cargo clippy --workspace --no-default-features --features "compat-3-0-0 rustls" -v -- -Dwarnings

- name: Lints (compat-3-3-0)
run: cargo clippy --workspace --no-default-features --features "compat-3-3-0 rustls" -v -- -Dwarnings
- name: Lints (bson 3)
run: cargo clippy --workspace --no-default-features --features "compat-3-3-0 bson-3 rustls" -v -- -Dwarnings

- name: Tests
run: cargo test --workspace -v
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ include = ["src/**/*", "README.md", "CHANGELOG.md"]
[features]
default = ["compat-3-0-0", "rustls"]
compat-3-0-0 = ["mongodb/compat-3-0-0"]
compat-3-3-0 = ["mongodb/compat-3-3-0", "mongodb/bson-3"]
compat-3-3-0 = ["mongodb/compat-3-3-0"]
bson-3 = ["mongodb/bson-3"]
openssl = ["mongodb/openssl-tls"]
rustls = ["mongodb/rustls-tls"]

Expand Down
2 changes: 1 addition & 1 deletion src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use crate::CollectionConfig;

#[cfg(feature = "compat-3-3-0")]
#[cfg(feature = "bson-3")]
use mongodb::bson::deserialize_from_bson;
#[cfg(feature = "compat-3-0-0")]
use mongodb::bson::from_bson as deserialize_from_bson;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl ToRepository for mongodb::Database {
pub mod prelude {
#[cfg(feature = "compat-3-0-0")]
pub use mongodb::bson::de::Error as BsonDeserializeError;
#[cfg(feature = "compat-3-3-0")]
#[cfg(feature = "bson-3")]
pub use mongodb::bson::error::Error as BsonError;

pub use crate::mongo::bson::oid::ObjectId;
Expand Down
2 changes: 1 addition & 1 deletion src/repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use async_trait::async_trait;
use mongodb::bson::oid::ObjectId;
use mongodb::bson::{Document, doc};

#[cfg(feature = "compat-3-3-0")]
#[cfg(feature = "bson-3")]
use mongodb::bson::{deserialize_from_document, serialize_to_bson};
#[cfg(feature = "compat-3-0-0")]
use mongodb::bson::{from_document as deserialize_from_document, to_bson as serialize_to_bson};
Expand Down
Loading