Bring the version command output in line with other rust tools

This commit is contained in:
Lukas Wirth
2022-06-02 18:14:38 +02:00
parent 88024c7ec2
commit a2a3ea86ea
8 changed files with 105 additions and 66 deletions

View File

@@ -22,6 +22,7 @@ use crate::cli::{
};
use crate::line_index::{LineEndings, LineIndex, OffsetEncoding};
use crate::to_proto;
use crate::version::version;
/// Need to wrap Snapshot to provide `Clone` impl for `map_with`
struct Snap<DB>(DB);
@@ -312,7 +313,7 @@ impl flags::Lsif {
tool_info: Some(lsp_types::lsif::ToolInfo {
name: "rust-analyzer".to_string(),
args: vec![],
version: Some(env!("REV").to_string()),
version: Some(version().to_string()),
}),
}));
for file in si.files {