Commit 34fe0ce
committed
internal: fix gdb pretty printer when using Repr::Static
I missed a ["__0"] to access the str in the Static case.
Also, simplify the code to rely on the pretty printer for str
rather than accessing data_ptr/length directly. This makes it
more robust against changes in str.
Output before: "<SmolStr Static error: There is no member named data_ptr.>"
Output after: "preferred-width"1 parent c984395 commit 34fe0ce
File tree
1 file changed
+3
-5
lines changed- src/tools/rust-analyzer/lib/smol_str/src
1 file changed
+3
-5
lines changedLines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 76 | + | |
| 77 | + | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
| 83 | + | |
86 | 84 | | |
87 | 85 | | |
88 | 86 | | |
| |||
0 commit comments