Wonder if it's possible in theory (scratched my head at it for a bit but couldn't quite figure all the details), to have something like:
const S: ArrayString<10> = array_string!("foo");
This would be super cool as it would allow pre-initialized array-strings in const contexts which is currently not doable.
// Without macros, as of this moment, don't think it's possible.
// It's most likely (?) doable via a proc-macro (the problem there will be that we don't know the cap), and may also require adding an extra 'raw' const constructor.
Wonder if it's possible in theory (scratched my head at it for a bit but couldn't quite figure all the details), to have something like:
This would be super cool as it would allow pre-initialized array-strings in const contexts which is currently not doable.
// Without macros, as of this moment, don't think it's possible.
// It's most likely (?) doable via a proc-macro (the problem there will be that we don't know the cap), and may also require adding an extra 'raw' const constructor.