app-dirs-rs icon indicating copy to clipboard operation
app-dirs-rs copied to clipboard

AppInfo stores strings incorrectly

Open kotauskas opened this issue 5 years ago • 1 comments

The AppInfo struct stores the &'static str type, which fails miserably if any of the fields are borrowed from an owned String. It should be changed to use an explicit generic lifetime parameter and store the string slices with that lifetime.

kotauskas avatar Apr 28 '20 13:04 kotauskas

I don't think this wrong, it's just not fully general. I agree that it would be better if it were generic, but the current code won't cause any bugs, and can still function perfectly well with compile-time-known strings.

daboross avatar Apr 28 '20 21:04 daboross