uv icon indicating copy to clipboard operation
uv copied to clipboard

Add `fs_err` to `disallowed_method` in clippy.toml

Open yasufumy opened this issue 1 year ago • 3 comments

Summary

Resolve #1916

yasufumy avatar Feb 24 '24 12:02 yasufumy

Thanks for contributing! It looks like this isn't working e.g. this is unflagged

https://github.com/astral-sh/uv/blob/11ed4f7183cc25a00f23e86bd264d4055645eed2/crates/install-wheel-rs/src/wheel.rs#L398

zanieb avatar Feb 24 '24 16:02 zanieb

I think it has to be a list of fully-qualified methods, rather than a module. So we'd have to like... enumerate every method in fs, to enforce this? Or is there a more conventional fix for this?

charliermarsh avatar Feb 24 '24 19:02 charliermarsh

@zanieb Thanks! I fixed my misconfiguration.

@charliermarsh Unfortunately, there seems to be no convenient way to do this like std::fs::*, so I enumerated all the methods in std::fs that can be replaced in fs_err.

yasufumy avatar Feb 25 '24 08:02 yasufumy