Skip to content

Commit

Permalink
Merge pull request #55 from Turbo87/rustdoc-readme
Browse files Browse the repository at this point in the history
Use `README.md` as module doc comment
  • Loading branch information
Turbo87 authored Sep 5, 2024
2 parents 080c5e5 + 8686ba7 commit 2672c8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ Usage
------------------------------------------------------------------------------

```rust
fn main() {
let manifest = Manifest::from_path("Cargo.toml").unwrap();
}
use cargo_manifest::Manifest;

let manifest = Manifest::from_path("Cargo.toml").unwrap();
```

see [docs.rs](https://docs.rs/cargo-manifest) for more information.
Expand Down
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#![allow(clippy::large_enum_variant)]
//! This crate defines `struct`s that can be deserialized with Serde
//! to load and inspect `Cargo.toml` metadata.
//!
//! See `Manifest::from_slice`.
#![doc = include_str!("../README.md")]

use serde::Deserializer;
use serde::{Deserialize, Serialize, Serializer};
use std::collections::BTreeMap;
Expand Down

0 comments on commit 2672c8c

Please sign in to comment.