-
Notifications
You must be signed in to change notification settings - Fork 145
RUST-736 Update documentation for 2.0 release #295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2580131
fb0f941
bf44438
8a97ac8
6d621c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
set -o errexit | ||
|
||
. ~/.cargo/env | ||
cargo +nightly rustdoc -p bson --all-features -- --cfg docsrs -D warnings |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ use_try_shorthand = true | |
wrap_comments = true | ||
imports_layout = "HorizontalVertical" | ||
imports_granularity = "Crate" | ||
ignore = ["src/lib.rs"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rustfmt kept messing up the table that has the feature flags in it so I just had it skip |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -321,12 +321,21 @@ impl From<oid::ObjectId> for Bson { | |
} | ||
|
||
#[cfg(feature = "chrono-0_4")] | ||
#[cfg_attr(docsrs, doc(cfg(feature = "chrono-0_4")))] | ||
impl<T: chrono::TimeZone> From<chrono::DateTime<T>> for Bson { | ||
fn from(a: chrono::DateTime<T>) -> Bson { | ||
Bson::DateTime(crate::DateTime::from(a)) | ||
} | ||
} | ||
|
||
#[cfg(feature = "uuid-0_8")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed this wasn't here after I tried to ensure my documentation examples compiled. For completeness, I just went ahead and implemented it (RUST-997). |
||
#[cfg_attr(docsrs, doc(cfg(feature = "uuid-0_8")))] | ||
impl From<uuid::Uuid> for Bson { | ||
fn from(uuid: uuid::Uuid) -> Self { | ||
Bson::Binary(uuid.into()) | ||
} | ||
} | ||
|
||
impl From<crate::DateTime> for Bson { | ||
fn from(dt: crate::DateTime) -> Self { | ||
Bson::DateTime(dt) | ||
|
@@ -1045,6 +1054,17 @@ impl Binary { | |
} | ||
} | ||
|
||
#[cfg(feature = "uuid-0_8")] | ||
#[cfg_attr(docsrs, doc(cfg(feature = "uuid-0_8")))] | ||
impl From<uuid::Uuid> for Binary { | ||
fn from(uuid: uuid::Uuid) -> Self { | ||
Binary { | ||
subtype: BinarySubtype::Uuid, | ||
bytes: uuid.as_bytes().to_vec(), | ||
} | ||
} | ||
} | ||
|
||
/// Represents a DBPointer. (Deprecated) | ||
#[derive(Debug, Clone, PartialEq)] | ||
pub struct DbPointer { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the structure was updated to match the driver's readme