Skip to content

Commit

Permalink
Merge pull request #113 from Vincent-P/master
Browse files Browse the repository at this point in the history
Change text document's version to i64 instead of u64
  • Loading branch information
Marwes committed Aug 23, 2019
2 parents cd3771d + 2cc1970 commit 7541822
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 7541822

Please sign in to comment.