mirror of
https://github.com/astral-sh/uv.git
synced 2025-09-24 19:22:35 +00:00
Rename Error::IO
to Error::Io
(#5174)
## Summary I believe this is by convention (see, e.g., in Rust itself: https://github.com/search?q=repo%3Arust-lang%2Frust+%2F%28%3F-i%29Io%2F&type=code).
This commit is contained in:
parent
61a81da760
commit
8484611753
11 changed files with 23 additions and 23 deletions
|
@ -86,7 +86,7 @@ pub(crate) fn create(
|
|||
match location.metadata() {
|
||||
Ok(metadata) => {
|
||||
if metadata.is_file() {
|
||||
return Err(Error::IO(io::Error::new(
|
||||
return Err(Error::Io(io::Error::new(
|
||||
io::ErrorKind::AlreadyExists,
|
||||
format!("File exists at `{}`", location.user_display()),
|
||||
)));
|
||||
|
@ -103,7 +103,7 @@ pub(crate) fn create(
|
|||
{
|
||||
info!("Ignoring empty directory");
|
||||
} else {
|
||||
return Err(Error::IO(io::Error::new(
|
||||
return Err(Error::Io(io::Error::new(
|
||||
io::ErrorKind::AlreadyExists,
|
||||
format!(
|
||||
"The directory `{}` exists, but it's not a virtualenv",
|
||||
|
@ -116,7 +116,7 @@ pub(crate) fn create(
|
|||
Err(err) if err.kind() == io::ErrorKind::NotFound => {
|
||||
fs::create_dir_all(location)?;
|
||||
}
|
||||
Err(err) => return Err(Error::IO(err)),
|
||||
Err(err) => return Err(Error::Io(err)),
|
||||
}
|
||||
|
||||
let location = location.canonicalize()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue