Commit graph

6 commits

Author SHA1 Message Date
Jiahao XU
2f27a5fd93
Refactor: Use binstall_v1::MetaData in mod binstall
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-27 19:44:16 +10:00
Jiahao XU
cc13aa911f
Refactor: Extract helpers::cratesio_url
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-27 19:22:45 +10:00
Jiahao XU
32b98f0c5a
Fix Deserialize for CrateVersionSource
Use `Cow::<'_, str>::deserialize` to ensure that it would still work
even if it contains escaped characters.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-22 01:43:40 +10:00
Jiahao XU
9d9a31bef3
Optimize Deserialize impl for CrateVersionSource
Use `<&str>::deserialize` instead of `String::deserialize` to avoid
intermediate `String`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-22 01:23:58 +10:00
Jiahao XU
5bdffd9178
Refactor: Impl Source::cratesio_registry
Makes initializing `metafiles::CrateVersionSource` more readable and
improves performance since the parsing is now cached.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-20 16:48:34 +10:00
Félix Saparelli
17cf6f5dc5
Write to .crates2.json 2022-07-05 21:17:59 +12:00