Skip to content

Commit

Permalink
Fix a bug where Json API save-analysis was not labelled as such
Browse files Browse the repository at this point in the history
  • Loading branch information
nrc committed Jun 12, 2017
1 parent cb7fcdd commit d438b81
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/librustc_save_analysis/json_api_dumper.rs
Expand Up @@ -17,7 +17,7 @@ use data::{VariableKind, Visibility};
use dump::Dump;
use id_from_def_id;

use rls_data::{Analysis, Import, ImportKind, Def, DefKind, CratePreludeData};
use rls_data::{Analysis, Import, ImportKind, Def, DefKind, CratePreludeData, Format};


// A dumper to dump a restricted set of JSON information, designed for use with
Expand All @@ -33,7 +33,9 @@ pub struct JsonApiDumper<'b, W: Write + 'b> {

impl<'b, W: Write> JsonApiDumper<'b, W> {
pub fn new(writer: &'b mut W) -> JsonApiDumper<'b, W> {
JsonApiDumper { output: writer, result: Analysis::new() }
let mut result = Analysis::new();
result.kind = Format::JsonApi;
JsonApiDumper { output: writer, result }
}
}

Expand Down

0 comments on commit d438b81

Please sign in to comment.