Skip to content

Commit 0da5448

Browse files
tomhoulemathstuf
andauthored
Apply suggestions from code review
Co-authored-by: Ben Boeckel <mathstuf@users.noreply.github.com>
1 parent 53121eb commit 0da5448

File tree

1 file changed

+3
-2
lines changed
  • graphql_client_codegen/src

1 file changed

+3
-2
lines changed

graphql_client_codegen/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ impl Display for ReadFileError {
153153
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
154154
match self {
155155
ReadFileError::FileNotFound { path, .. } => {
156-
write!(f, "Could not find file with path: {}\
156+
write!(f, "Could not find file with path: {} \
157157
Hint: file paths in the GraphQLQuery attribute are relative to the project root (location of the Cargo.toml). Example: query_path = \"src/my_query.graphql\".", path)
158158
}
159159
ReadFileError::ReadError { path, .. } => {
@@ -168,7 +168,8 @@ impl std::error::Error for ReadFileError {
168168
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
169169
match self {
170170
ReadFileError::FileNotFound { path: _, io_error } => Some(io_error),
171-
ReadFileError::ReadError { path: _, io_error } => Some(io_error),
171+
ReadFileError::FileNotFound { io_error, .. }
172+
| ReadFileError::ReadError { io_error, .. } => Some(io_error),
172173
}
173174
}
174175
}

0 commit comments

Comments
 (0)