Skip to content

Commit 7ff08df

Browse files
authored
Merge pull request #118 from nagisa/nagisa/fix-docs
Adjust top-level documentation for current state
2 parents af394d8 + f42a447 commit 7ff08df

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ script:
1313
- cargo check --verbose --target powerpc64-unknown-linux-gnu --lib --bins --tests || exit 1
1414
- cargo build --verbose --all || exit 1
1515
- cargo test --verbose --all
16+
- cargo doc --verbose --all

measureme/src/lib.rs

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,32 @@
1313
//! To create a [`Profiler`], call the [`Profiler::new()`] function and provide a `Path` with
1414
//! the directory and file name for the trace files.
1515
//!
16-
//! To record an event, call the [`Profiler::record_instant_event()`] method, passing a few arguments:
16+
//! To record an event, call the [`Profiler::record_instant_event()`] method, passing a few
17+
//! arguments:
1718
//! - `event_kind`: a [`StringId`] which assigns an arbitrary category to the event
1819
//! - `event_id`: a [`StringId`] which specifies the name of the event
1920
//! - `thread_id`: a `u32` id of the thread which is recording this event
2021
//!
21-
//! Alternatively, events can also be recorded via the [`Profiler::start_recording_interval_event()`] method. This
22-
//! method records a "start" event and returns a `TimingGuard` object that will automatically record
23-
//! the corresponding "end" event when it is dropped.
22+
//! Alternatively, events can also be recorded via the
23+
//! [`Profiler::start_recording_interval_event()`] method. This method records a "start" event and
24+
//! returns a `TimingGuard` object that will automatically record the corresponding "end" event
25+
//! when it is dropped.
2426
//!
2527
//! To create a [`StringId`], call one of the string allocation methods:
26-
//! - [`Profiler::alloc_string()`]: allocates a string and returns the [`StringId`] that refers to it
27-
//! - [`Profiler::alloc_string_with_reserved_id()`]: allocates a string using the specified [`StringId`].
28-
//! It is up to the caller to make sure the specified [`StringId`] hasn't already been used.
29-
//!
30-
//! [`Profiler`]: struct.Profiler.html
31-
//! [`Profiler::alloc_string()`]: struct.Profiler.html#method.alloc_string
32-
//! [`Profiler::alloc_string_with_reserved_id()`]: struct.Profiler.html#method.alloc_string_with_reserved_id
33-
//! [`Profiler::new()`]: struct.Profiler.html#method.new
34-
//! [`Profiler::record_event()`]: struct.Profiler.html#method.record_event
35-
//! [`Profiler::start_recording_interval_event()`]: struct.Profiler.html#method.start_recording_interval_event
36-
//! [`StringId`]: struct.StringId.html
37-
38-
#![deny(warnings)]
28+
//! - [`Profiler::alloc_string()`]: allocates a string and returns the [`StringId`] that refers
29+
//! to it
30+
//!
31+
//! [`Profiler`]: Profiler
32+
//! [`Profiler::alloc_string()`]: Profiler::alloc_string
33+
//! [`Profiler::alloc_string_with_reserved_id()`]: Profiler::alloc_string_with_reserved_id
34+
//! [`Profiler::new()`]: Profiler::new
35+
//! [`Profiler::record_event()`]: Profiler::record_event
36+
//! [`Profiler::start_recording_interval_event()`]: Profiler::start_recording_interval_event
37+
//! [`StringId`]: StringId
38+
#![deny(
39+
warnings,
40+
intra_doc_link_resolution_failure,
41+
)]
3942

4043
pub mod event_id;
4144
pub mod file_header;

0 commit comments

Comments
 (0)