Skip to content

Commit

Permalink
Change text document's version to i64 instead of u64
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent-P committed Aug 18, 2019
1 parent cd3771d commit 2cc1970
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -644,14 +644,14 @@ pub struct TextDocumentItem {

/// The version number of this document (it will strictly increase after each
/// change, including undo/redo).
pub version: u64,
pub version: i64,

/// The content of the opened text document.
pub text: String,
}

impl TextDocumentItem {
pub fn new(uri: Url, language_id: String, version: u64, text: String) -> TextDocumentItem {
pub fn new(uri: Url, language_id: String, version: i64, text: String) -> TextDocumentItem {
TextDocumentItem {
uri,
language_id,
Expand All @@ -669,11 +669,11 @@ pub struct VersionedTextDocumentIdentifier {
pub uri: Url,

/// The version number of this document.
pub version: Option<u64>,
pub version: Option<i64>,
}

impl VersionedTextDocumentIdentifier {
pub fn new(uri: Url, version: u64) -> VersionedTextDocumentIdentifier {
pub fn new(uri: Url, version: i64) -> VersionedTextDocumentIdentifier {
VersionedTextDocumentIdentifier {
uri,
version: Some(version),
Expand Down

0 comments on commit 2cc1970

Please sign in to comment.