Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit f024cdb

Browse files
authored
Merge pull request #1155 from Xanewok/tooltip-test
Update String tooltip test
2 parents 816017b + c1e0b80 commit f024cdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test_data/hover/save_data/test_tooltip_std.rs.0025_017.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"Ok": [
99
{
1010
"language": "rust",
11-
"value": "liballoc/string.rs"
11+
"value": "src/liballoc/string.rs"
1212
},
1313
"https://doc.rust-lang.org/nightly/alloc/string/",
1414
"A UTF-8 encoded, growable string.\n\nThis module contains the [`String`] type, a trait for converting\n[`ToString`]s, and several error types that may result from working with\n[`String`]s.\n\n[`ToString`]: trait.ToString.html\n\n# Examples\n\nThere are multiple ways to create a new [`String`] from a string literal:\n\n```rust\nlet s = \"Hello\".to_string();\n\nlet s = String::from(\"world\");\nlet s: String = \"also this\".into();\n```\n\nYou can create a new [`String`] from an existing one by concatenating with\n`+`:\n\n[`String`]: struct.String.html\n\n```rust\nlet s = \"Hello\".to_string();\n\nlet message = s + \" world!\";\n```\n\nIf you have a vector of valid UTF-8 bytes, you can make a [`String`] out of\nit. You can do the reverse too.\n\n```rust\nlet sparkle_heart = vec![240, 159, 146, 150];\n\n// We know these bytes are valid, so we'll use `unwrap()`.\nlet sparkle_heart = String::from_utf8(sparkle_heart).unwrap();\n\nassert_eq!(\"💖\", sparkle_heart);\n\nlet bytes = sparkle_heart.into_bytes();\n\nassert_eq!(bytes, [240, 159, 146, 150]);\n```"

0 commit comments

Comments
 (0)