-
Notifications
You must be signed in to change notification settings - Fork 144
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
RUST-736 Update documentation for 2.0 release #295
Conversation
[](https://crates.io/crates/bson) | ||
|
||
Encoding and decoding support for BSON in Rust | ||
|
||
## Index | ||
- [Installation](#installation) |
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
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 comment
The 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).
|
||
#![allow(clippy::cognitive_complexity)] | ||
#![doc(html_root_url = "https://docs.rs/bson/2.0.0-beta.3")] | ||
#![cfg_attr(docsrs, feature(doc_cfg))] |
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.
this allows us to display the little badges next to things that are behind feature flags
@@ -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 comment
The 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 lib.rs
. Once rust-lang/rustfmt#4210 is released we should be able to remove this.
dbc930d
to
6d621c0
Compare
RUST-736
This PR updates the documentation to account for the 2.0 API, namely the
chrono
anduuid
changes. As part of that, it also completes RUST-997.Some other housekeeping changes were made too:
#[doc(inline)]
You can see all the new changes in action by running:
and comparing it to our latest documentation on docs.rs.