A Name needs to use .to_string() before comparing to a String.
Closed this issue · 2 comments
vkobinski commented
Reproducing the behavior
let test = Name:new("test");
if test == "test" {
//
}
If you make the comparison like this, it causes a Segmentation fault.
System Settings
- Bend: 0.2.18
- Ubuntu 22.04.4 LTS on Windows 10 x86_64
Additional context
LunaAmora commented
The code you showed here just executes fine the inside of the if
, so i can't reproduce.
It shouldn't cause any segmentation fault, Name
implements PartialEq for "&str", witch just compares the interned string to the string slice.
developedby commented
Closing since we couldn't reproduce