about summary refs log tree commit diff
path: root/library
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-03-03 20:01:47 +0100
committerGitHub <noreply@github.com>2022-03-03 20:01:47 +0100
commit40c146cebd8b989973f56616ccd62c625ccf738e (patch)
tree4724cd440df067daecc91bd18b4e7d645651e8de /library
parent835eaaa77e73cb259f60de33ad093a465e9dc65c (diff)
parent37c1eb0a470e0fb18db8a230181d6e1c600bde60 (diff)
downloadrust-40c146cebd8b989973f56616ccd62c625ccf738e.tar.gz
rust-40c146cebd8b989973f56616ccd62c625ccf738e.zip
Rollup merge of #94551 - darnuria:doc-map-backstick, r=dtolnay
Doc: Fix use of quote instead of backstick in Adapter::map.

A little commit to fix documentation rendering and semantics in https://doc.rust-lang.org/std/iter/struct.Map.html#notes-about-side-effects `"` where used around an expression instead \`.

Screenshot on doc.rust-lang.org:
![2022-03-03 11-21-43_backstick](https://user-images.githubusercontent.com/2827553/156546536-569b7692-7ac4-4388-8e93-c1628ddc6a0f.png)

Looking forward: Maybe reworking the doc to use assert_eq like the upper paragraph:
```
let v: Vec<i32> = vec![1, 2, 3].into_iter().map(|x| x + 1).rev().collect();

assert_eq!(v, [4, 3, 2]);
```
Diffstat (limited to 'library')
-rw-r--r--library/core/src/iter/adapters/map.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/iter/adapters/map.rs b/library/core/src/iter/adapters/map.rs
index b2ed82508dd..d2077a63e15 100644
--- a/library/core/src/iter/adapters/map.rs
+++ b/library/core/src/iter/adapters/map.rs
@@ -38,7 +38,7 @@ use crate::ops::Try;
 /// }
 /// ```
 ///
-/// This will print "('a', 1), ('b', 2), ('c', 3)".
+/// This will print `('a', 1), ('b', 2), ('c', 3)`.
 ///
 /// Now consider this twist where we add a call to `rev`. This version will
 /// print `('c', 1), ('b', 2), ('a', 3)`. Note that the letters are reversed,