You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a &`static str means that the string supplied to the schema must be a string known at compile time and created at program execution (akin to a static const char* in C). This disallows reading a schema in from a file.
Looking at how SuppliedSchema uses it's string, it's not obvious that a static string is needed or why an owned string should not be used. In terms of performance, this is a one-time operation or thereabouts, and is not a repeated call, and usually upon program initiation, meaning super-high performance isn't really a factor.
Using an owned string is more usable and transparent and allows for more flexibility in the use of SuppliedSchema
A proposed fix is in an upcoming PR.
The text was updated successfully, but these errors were encountered:
Using a
&`static str
means that the string supplied to the schema must be a string known at compile time and created at program execution (akin to astatic const char*
in C). This disallows reading a schema in from a file.Looking at how
SuppliedSchema
uses it's string, it's not obvious that a static string is needed or why an owned string should not be used. In terms of performance, this is a one-time operation or thereabouts, and is not a repeated call, and usually upon program initiation, meaning super-high performance isn't really a factor.Using an owned string is more usable and transparent and allows for more flexibility in the use of
SuppliedSchema
A proposed fix is in an upcoming PR.
The text was updated successfully, but these errors were encountered: