Implement Encoder for Diagnostic manually
...so we can skip serializing `tool_metadata` if it hasn't been set. This makes the output a bit cleaner, and avoiding having to update a bunch of unrelated tests.
This commit is contained in:
parent
82ccb6582a
commit
50572d6629
12 changed files with 84 additions and 52 deletions
|
@ -83,6 +83,10 @@ impl ToolMetadata {
|
|||
fn new(json: Json) -> Self {
|
||||
ToolMetadata(Some(json))
|
||||
}
|
||||
|
||||
fn is_set(&self) -> bool {
|
||||
self.0.is_some()
|
||||
}
|
||||
}
|
||||
|
||||
impl Hash for ToolMetadata {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue