Skip to content

Commit 912ba67

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

File tree

1 file changed

+3
-3
lines changed
  • graphql_client_codegen/src

1 file changed

+3
-3
lines changed

graphql_client_codegen/src/lib.rs

Lines changed: 3 additions & 3 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: {}\n
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, .. } => {
@@ -167,8 +167,8 @@ impl Display for ReadFileError {
167167
impl std::error::Error for ReadFileError {
168168
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
169169
match self {
170-
ReadFileError::FileNotFound { path: _, io_error } => Some(io_error),
171-
ReadFileError::ReadError { path: _, io_error } => Some(io_error),
170+
ReadFileError::FileNotFound { io_error, .. }
171+
| ReadFileError::ReadError { io_error, .. } => Some(io_error),
172172
}
173173
}
174174
}

0 commit comments

Comments
 (0)