Skip to content

Commit 996fce6

Browse files
committed
Merge pull request #82 from steveklabnik/usage_docs
Add usage docs in-crate
2 parents e714371 + 0953120 commit 996fce6

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/lib.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,21 @@
1919
//! support and exhaustively lists the supported syntax. For more specific
2020
//! details on the API, please see the documentation for the `Regex` type.
2121
//!
22+
//! # Usage
23+
//!
2224
//! This crates is [on crates.io](https://crates.io/crates/regex) and can be
23-
//! used by adding `regex` to your dependencies in your projects `Cargo.toml`.
25+
//! used by adding `regex` to your dependencies in your project's `Cargo.toml`.
26+
//!
27+
//! ```toml
28+
//! [dependencies]
29+
//! regex = "0.1.8"
30+
//! ```
31+
//!
32+
//! and this to your crate root:
33+
//!
34+
//! ```rust
35+
//! extern crate regex;
36+
//! ```
2437
//!
2538
//! # First example: find a date
2639
//!

0 commit comments

Comments
 (0)