I have replaced the String names with ImmutableString names. In the process, I added several enhancements to ImmutableString. I added From<String> support to allow ImmutableStrings to be created without copying. I have added Serde implementations for ImmutableString, since Serde support is required for FloatingWindowDescriptor and TileContentDescriptor. I have added a pub use in the fyrox-core library to simplify using ImmutableString.
I have added tests to confirm that ImmutableStrings created by From<String> operate correctly, and testing Fyroxed with these changes reveals no ill effects.
I noticed a potential issue with one of the tests where it asserts a particular value for entry_count(), but the actual value of entry_count() depends on the order in which the tests are executed, which should be unpredictable. Therefore I commented out that assertion.
As an afterthought, I also turned Animation names into ImmutableStrings. I tried making a few animations and this change seems to have had no consequences.
I have replaced the String names with ImmutableString names. In the process, I added several enhancements to ImmutableString. I added
From<String>
support to allow ImmutableStrings to be created without copying. I have added Serde implementations for ImmutableString, since Serde support is required for FloatingWindowDescriptor and TileContentDescriptor. I have added apub use
in the fyrox-core library to simplify using ImmutableString.I have added tests to confirm that ImmutableStrings created by
From<String>
operate correctly, and testing Fyroxed with these changes reveals no ill effects.I noticed a potential issue with one of the tests where it asserts a particular value for
entry_count()
, but the actual value ofentry_count()
depends on the order in which the tests are executed, which should be unpredictable. Therefore I commented out that assertion.As an afterthought, I also turned Animation names into ImmutableStrings. I tried making a few animations and this change seems to have had no consequences.