提交 1283044a 编写于 作者: P Pascal Hertleif

Clean up HashSet Examples

上级 6814c2f1
......@@ -66,17 +66,17 @@
/// books.insert("The Great Gatsby");
///
/// // Check for a specific one.
/// if !books.contains(&("The Winds of Winter")) {
/// if !books.contains("The Winds of Winter") {
/// println!("We have {} books, but The Winds of Winter ain't one.",
/// books.len());
/// }
///
/// // Remove a book.
/// books.remove(&"The Odyssey");
/// books.remove("The Odyssey");
///
/// // Iterate over everything.
/// for book in books.iter() {
/// println!("{}", *book);
/// for book in &books {
/// println!("{}", book);
/// }
/// ```
///
......@@ -100,7 +100,7 @@
/// vikings.insert(Viking { name: "Harald", power: 8 });
///
/// // Use derived implementation to print the vikings.
/// for x in vikings.iter() {
/// for x in &vikings {
/// println!("{:?}", x);
/// }
/// ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册