Ivan Tham

Results 562 comments of Ivan Tham

@dtolnay I tried building on top of `SliceRead` from `serde-json` in which the slice now becomes `slice: &'a mut [u8]` but I am stuck in lifetime problem. It took me...

Thanks to alice in https://users.rust-lang.org/t/help-about-multiple-mutable-borrows/33494/8?u=pickfire, I found using `transmute` to transmute the lifetime which cannot be inferred useful to solve this issue. About safety, I believe the reference is valid...

Is that because I have yet add the other escapes? https://github.com/pickfire/json/commit/6bd0238645f6b880dc6770a5c127c5d340335734#diff-f400f58d5e78694b93db5d4fe5f2a246R681 ```rust #[test] fn test_from_mut_str_newline() { #[derive(Debug, PartialEq, Deserialize)] struct S

Yes, even just a single `\n` (1 char) fails because I don't manage those yet except `\n` (2 char).

@dtolnay I fixed the snowman bug, I forgot to ignore the memory before the first `\` and forgot to move the memory before the closing `"`. Can you please help...

@jonasbb Wow, thanks a lot for reviewing this. Nice. > The issue at hand is, that your code modifies the byte array of the String in a way, that the...

Patch updated with zero filling the extra bytes. https://github.com/pickfire/json/commit/e4f7b208ea22ff69169c3cbeed06032f0f9ca532 Feel free to check on it. After that, I will get on with the others `'\'`.

@jonasbb https://github.com/pickfire/json/commit/21379e3b39e8194dd1f16b3e08c8feea6862a3ab Added the rest, interested to check it out? I think just left the test, doc and maybe some code clean up.

Comparing the performance of benchmark recently. Looks like `from_mut_str` is kinda faster but does not seemed significant (~2%), maybe need to do some more tweaking. `_value` benchmarks uses `serde_json::Value` instead...

@dtolnay The current implementation is unsound where it have a footgun such that it will have undefined behavior if people try to deserialize it twice (probably no reason to do...