Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change text document's version to i64 instead of u64 #113

Merged
merged 1 commit into from
Aug 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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