mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 18:38:21 +00:00
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:
parent
a5a917169b
commit
70e877d11c
14 changed files with 49 additions and 11 deletions
|
@ -17,7 +17,7 @@ pub(crate) struct RenderBenchmarksArgs {
|
|||
}
|
||||
|
||||
pub(crate) fn render_benchmarks(args: &RenderBenchmarksArgs) -> Result<()> {
|
||||
let mut results: BenchmarkResults = serde_json::from_slice(&std::fs::read(&args.path)?)?;
|
||||
let mut results: BenchmarkResults = serde_json::from_slice(&fs_err::read(&args.path)?)?;
|
||||
|
||||
// Replace the command with a shorter name. (The command typically includes the benchmark name,
|
||||
// but we assume we're running over a single benchmark here.)
|
||||
|
@ -85,7 +85,7 @@ fn render_to_png(data: &str, path: &Path, fontdb: &fontdb::Database) -> Result<(
|
|||
pixmap.as_mut(),
|
||||
)
|
||||
.ok_or_else(|| anyhow!("failed to render"))?;
|
||||
std::fs::create_dir_all(path.parent().unwrap())?;
|
||||
fs_err::create_dir_all(path.parent().unwrap())?;
|
||||
pixmap.save_png(path)?;
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue