mirror of
https://github.com/latex-lsp/texlab.git
synced 2025-08-04 02:39:21 +00:00
Simplify constructor functions
This commit is contained in:
parent
da999c1d08
commit
9dd6dbdc59
3 changed files with 4 additions and 4 deletions
|
@ -155,7 +155,7 @@ struct BibtexContentAnalyzer<'a> {
|
|||
|
||||
impl<'a> BibtexContentAnalyzer<'a> {
|
||||
pub fn new() -> Self {
|
||||
BibtexContentAnalyzer { tokens: Vec::new() }
|
||||
Self { tokens: Vec::new() }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ pub struct Workspace {
|
|||
|
||||
impl Workspace {
|
||||
pub fn new() -> Self {
|
||||
Workspace {
|
||||
Self {
|
||||
documents: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ pub struct BuildError {
|
|||
|
||||
impl BuildError {
|
||||
pub fn new(uri: Uri, kind: BuildErrorKind, message: String, line: Option<u64>) -> Self {
|
||||
BuildError {
|
||||
Self {
|
||||
uri,
|
||||
kind,
|
||||
message,
|
||||
|
@ -264,7 +264,7 @@ struct FileRange {
|
|||
|
||||
impl FileRange {
|
||||
fn new(uri: Option<Uri>, start: usize, end: usize) -> Self {
|
||||
FileRange { uri, start, end }
|
||||
Self { uri, start, end }
|
||||
}
|
||||
|
||||
fn length(&self) -> usize {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue