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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user