Skip to content

Commit 78b69aa

Browse files
committed
add a syntax highlighting for the code in documentation
1 parent 01ae9c2 commit 78b69aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A library for simple profiling your code with HTML reports as result.
44
At first the rprofiler must be initialized by the call `rprofiler::PROFILER.initialize()` method.
55
This method is returned an object of ProfilerData struct, where will be gathering all runtime information.
66
Then you can use special `profile_block` macro for profiling blocks of your code. It has some syntax variations:
7-
```
7+
```rust
88
profile_block!();
99
profile_block!(name "name of code block");
1010
// Conditional profiling
@@ -31,7 +31,7 @@ features = ["disable_profiling"]
3131
```
3232

3333
# Examples
34-
```
34+
```rust
3535
fn factorial(value: i32) -> i32 {
3636
match value > 1 {
3737
true => value*factorial(value - 1),

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! At first the rprofiler must be initialized by the call `rprofiler::PROFILER.initialize()` method.
55
//! This method is returned an object of ProfilerData struct, where will be gathering all runtime information.
66
//! Then you can use special `profile_block` macro for profiling blocks of your code. It has some syntax variations:
7-
//! ```
7+
//! ```rust
88
//! profile_block!();
99
//! profile_block!(name "name of code block");
1010
//! // Conditional profiling
@@ -31,7 +31,7 @@
3131
//! ```
3232
//!
3333
//! # Examples
34-
//! ```
34+
//! ```rust
3535
//! fn factorial(value: i32) -> i32 {
3636
//! match value > 1 {
3737
//! true => value*factorial(value - 1),

0 commit comments

Comments
 (0)