Closed
Description
As mentioned in #170 , I am currently writing Java bindings for this project.
There is another issue I encountered: the use of &str
as a key type in FluentArgs
makes insertion of strings from other scopes impossible without leaking memory.
For example, this is not possible, because param
is dropped:
fn put(args: &mut FluentArgs, param: String, value: FluentValue) {
args.insert(¶m, value);
}
This results in the fact that you can essentially only use literals as arguments for that method, unless you leak memory to make a &'static str
.
My suggestion would be to use a different key type, such as Cow<str>
or String
. This would certainly be quite a breaking change, so I'm open to ideas how to fix this on the spot.
This issue may not only be relevant for my specific use case, I think.
Metadata
Metadata
Assignees
Labels
No labels