Add fs_err to disallowed_method in clippy.toml (#1950)

## Summary

Resolve #1916

---------

Co-authored-by: konsti <konstin@mailbox.org>
This commit is contained in:
Taniguchi Yasufumi 2024-02-26 23:15:07 +09:00 committed by GitHub
parent a5a917169b
commit 70e877d11c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 49 additions and 11 deletions

View file

@ -980,7 +980,7 @@ impl<'a, T: BuildContext> SourceDistCachedBuilder<'a, T> {
/// Read an existing HTTP-cached [`Manifest`], if it exists.
pub(crate) fn read_http_manifest(cache_entry: &CacheEntry) -> Result<Option<Manifest>, Error> {
match std::fs::File::open(cache_entry.path()) {
match fs_err::File::open(cache_entry.path()) {
Ok(file) => {
let data = DataWithCachePolicy::from_reader(file)?.data;
Ok(Some(rmp_serde::from_slice::<Manifest>(&data)?))
@ -998,7 +998,7 @@ pub(crate) fn read_timestamp_manifest(
modified: ArchiveTimestamp,
) -> Result<Option<Manifest>, Error> {
// If the cache entry is up-to-date, return it.
match std::fs::read(cache_entry.path()) {
match fs_err::read(cache_entry.path()) {
Ok(cached) => {
let cached = rmp_serde::from_slice::<CachedByTimestamp<Manifest>>(&cached)?;
if cached.timestamp == modified.timestamp() {