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:
Charlie Marsh 2024-07-18 00:13:45 -04:00 committed by GitHub
parent 61a81da760
commit 8484611753
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 23 additions and 23 deletions

View file

@ -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()?;