mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-08 07:23:51 +00:00
Fix uv-fs extras by removing dead code (#2272)
Running the pep508_rs tests was failing due to uv-fs depending on `fs_err::tokio` even when not selected. But the function that used it is unused anyway, so i removed it.
This commit is contained in:
parent
d798653750
commit
85042308a1
2 changed files with 2 additions and 16 deletions
|
|
@ -36,7 +36,7 @@ nanoid = { workspace = true }
|
||||||
reqwest = { workspace = true }
|
reqwest = { workspace = true }
|
||||||
rmp-serde = { workspace = true }
|
rmp-serde = { workspace = true }
|
||||||
rustc-hash = { workspace = true }
|
rustc-hash = { workspace = true }
|
||||||
serde = { workspace = true , features = ["derive"] }
|
serde = { workspace = true, features = ["derive"] }
|
||||||
tempfile = { workspace = true }
|
tempfile = { workspace = true }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -13,20 +13,6 @@ pub use crate::path::*;
|
||||||
|
|
||||||
mod path;
|
mod path;
|
||||||
|
|
||||||
/// Reads the contents of the file path into memory.
|
|
||||||
///
|
|
||||||
/// If the file path is `-`, then contents are read from stdin instead.
|
|
||||||
pub async fn read(path: impl AsRef<Path>) -> std::io::Result<Vec<u8>> {
|
|
||||||
let path = path.as_ref();
|
|
||||||
if path == Path::new("-") {
|
|
||||||
let mut buf = Vec::with_capacity(1024);
|
|
||||||
std::io::stdin().read_to_end(&mut buf)?;
|
|
||||||
Ok(buf)
|
|
||||||
} else {
|
|
||||||
fs_err::tokio::read(path).await
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Reads the contents of the file path into memory as a `String`.
|
/// Reads the contents of the file path into memory as a `String`.
|
||||||
///
|
///
|
||||||
/// If the file path is `-`, then contents are read from stdin instead.
|
/// If the file path is `-`, then contents are read from stdin instead.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue