Jiahao XU
1e725a9ffe
Refactor: Extract Crates2Json::append{_to_path}
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-21 19:58:23 +10:00
Jiahao XU
0157a594e6
Fix err handling in CratesToml::append_to_path
...
Make it more robust to `io::Error`: Only create a `Self::default()` if
fails to open the file.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-21 19:54:45 +10:00
Jiahao XU
31d9716d28
Refactor: Extract CratesToml::append{_to_path}
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-21 19:50:23 +10:00
Jiahao XU
21eac33e1f
Optimize: Create new fn helpers::cargo_home
...
that caches return value of `home::cargo_home`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-07-21 13:13:07 +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