We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25394d1 commit e5b37eeCopy full SHA for e5b37ee
graphql_client_codegen/src/lib.rs
@@ -80,8 +80,8 @@ fn get_set_schema_from_file(schema_path: &std::path::Path) -> Schema {
80
get_set_cached(&SCHEMA_CACHE, schema_path, move || {
81
let schema_extension = schema_path
82
.extension()
83
- .and_then(std::ffi::OsStr::to_str)
84
- .unwrap_or("INVALID");
+ .map(|ext| ext.to_str().expect("Path must be valid UTF-8"))
+ .unwrap_or("<no extension>");
85
let schema_string = read_file(schema_path).unwrap();
86
match schema_extension {
87
"graphql" | "gql" => {
0 commit comments