File tree Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Original file line number Diff line number Diff line change 1
1
language : rust
2
+ rust :
3
+ - 1.0.0
4
+ - beta
5
+ - nightly
2
6
sudo : false
3
7
script :
4
8
- cargo build --verbose
5
9
- cargo test --verbose
6
- - cargo test --verbose --features pattern
10
+ - |
11
+ [ $TRAVIS_RUST_VERSION != nightly ] || (
12
+ cargo test --verbose --features pattern &&
13
+ cargo bench --verbose &&
14
+ cargo test --manifest-path=regex_macros/Cargo.toml &&
15
+ cargo bench --manifest-path=regex_macros/Cargo.toml
16
+ )
7
17
- cargo doc
8
- - cargo bench --verbose
9
- - cargo test --verbose --manifest-path=regex_macros/Cargo.toml
10
- - cargo bench --verbose --manifest-path=regex_macros/Cargo.toml
11
18
after_success : |
12
19
[ $TRAVIS_BRANCH = master ] &&
13
20
[ $TRAVIS_PULL_REQUEST = false ] &&
21
+ [ $TRAVIS_RUST_VERSION = nightly ] &&
14
22
echo '<meta http-equiv=refresh content=0;url=regex/index.html>' > target/doc/index.html &&
15
23
pip install ghp-import --user $USER &&
16
24
$HOME/.local/bin/ghp-import -n target/doc &&
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- #![ feature( test) ]
12
11
#![ cfg_attr( feature = "pattern" , feature( core) ) ]
13
12
14
13
extern crate regex;
15
- extern crate test;
16
14
17
15
// Due to macro scoping rules, this definition only applies for the modules
18
16
// defined below. Effectively, it allows us to use the same tests for both
Original file line number Diff line number Diff line change 19
19
//! support and exhaustively lists the supported syntax. For more specific
20
20
//! details on the API, please see the documentation for the `Regex` type.
21
21
//!
22
+ //! # Usage
23
+ //!
22
24
//! 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
+ //! ```
24
37
//!
25
38
//! # First example: find a date
26
39
//!
You can’t perform that action at this time.
0 commit comments