Skip to content

Commit

Permalink
Fix compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Jan 9, 2024
1 parent eebdec5 commit 7fef87c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/libfetchers/parser.hh
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ namespace nix::fetchers {
this->parsers
);

schema = std::make_shared<Schema>(Schema{attrSchema});
schema = std::make_shared<Schema>(attrSchema);
this->attrSchema = std::get_if<Schema::Attrs>(&schema->choice);
assert(this->attrSchema);
}
Expand Down
3 changes: 3 additions & 0 deletions src/libfetchers/schema.hh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ struct Schema {

std::variant<Primitive, Attrs> choice;
bool operator==(const Schema & other) const;

Schema(Primitive && p) : choice(p) {};
Schema(Attrs && p) : choice(p) {};
};

}

0 comments on commit 7fef87c

Please sign in to comment.