Skip to content

Commit

Permalink
analyzer: update deprecated unix time access (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm authored Apr 17, 2024
1 parent e8cbd4d commit 179a64d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/analyzer/index/IndexSerializer.v
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mut:

pub fn (mut s IndexSerializer) serialize_index(index Index) {
s.s.write_string(index.version)
s.s.write_i64(index.updated_at.unix)
s.s.write_i64(index.updated_at.unix())
s.serialize_file_indexes(index.per_file.data)
}

Expand Down
2 changes: 1 addition & 1 deletion src/lsp/log/log.v
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub struct LogItem {

// json is a JSON string representation of the log item.
pub fn (li LogItem) encode_json(mut wr io.Writer) ! {
wr.write('{"kind":"${li.kind}","timestamp":${li.timestamp.unix},"payload":'.bytes())!
wr.write('{"kind":"${li.kind}","timestamp":${li.timestamp.unix()},"payload":'.bytes())!
wr.write(li.payload)!
wr.write('}\n'.bytes())!
}
Expand Down
4 changes: 2 additions & 2 deletions src/server/features_semantic_tokens.v
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn (mut ls LanguageServer) semantic_tokens(text_document lsp.TextDocumentIde
dumb_aware_visitor := semantic.new_dumb_aware_semantic_visitor(range, file.psi_file)
tokens := dumb_aware_visitor.accept(file.psi_file.root)
return lsp.SemanticTokens{
result_id: time.now().unix_time().str()
result_id: time.now().unix().str()
data: semantic.encode(tokens)
}
}
Expand All @@ -42,7 +42,7 @@ pub fn (mut ls LanguageServer) semantic_tokens(text_document lsp.TextDocumentIde
result << resolve_tokens

return lsp.SemanticTokens{
result_id: time.now().unix_time().str()
result_id: time.now().unix().str()
data: semantic.encode(result)
}
}

0 comments on commit 179a64d

Please sign in to comment.