Skip to content

Commit 7142e34

Browse files
generatedunixname89002005320881meta-codesync[bot]
authored andcommitted
[QuickReview][Codemod][Lint:fbsource:RUSTFIX:clippy::io_other_error] Fix clippy::io_other_error issues in fbcode/antlir/util/cli/json_arg/src
Reviewed By: dtolnay Differential Revision: D89443844 fbshipit-source-id: a74ef0db14dc2f25eceae685e285281da23b3145
1 parent 906f810 commit 7142e34

File tree

1 file changed

+2
-3
lines changed
  • antlir/util/cli/json_arg/src

1 file changed

+2
-3
lines changed

antlir/util/cli/json_arg/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ where
6565
fn deserialize<R: Read>(reader: R) -> Result<T, Self::Error> {
6666
// [toml] has no way to deserialize from a reader :(
6767
let str = std::io::read_to_string(reader)?;
68-
toml::from_str(&str)
69-
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))
68+
toml::from_str(&str).map_err(|e| std::io::Error::other(e.to_string()))
7069
}
7170
}
7271

@@ -176,7 +175,7 @@ where
176175
value,
177176
deser: PhantomData,
178177
})
179-
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))
178+
.map_err(|e| std::io::Error::other(e.to_string()))
180179
}
181180
}
182181

0 commit comments

Comments
 (0)