diff options
Diffstat (limited to 'support/texlab/src/citation')
-rw-r--r-- | support/texlab/src/citation/driver.rs | 2 | ||||
-rw-r--r-- | support/texlab/src/citation/field/date.rs | 2 | ||||
-rw-r--r-- | support/texlab/src/citation/tests.rs | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/support/texlab/src/citation/driver.rs b/support/texlab/src/citation/driver.rs index 815474a107..ab3fe6d80f 100644 --- a/support/texlab/src/citation/driver.rs +++ b/support/texlab/src/citation/driver.rs @@ -1,7 +1,7 @@ use isocountry::CountryCode; use itertools::Itertools; +use lsp_types::Url; use titlecase::titlecase; -use url::Url; use crate::syntax::bibtex; diff --git a/support/texlab/src/citation/field/date.rs b/support/texlab/src/citation/field/date.rs index b67972e691..4eba9cdea4 100644 --- a/support/texlab/src/citation/field/date.rs +++ b/support/texlab/src/citation/field/date.rs @@ -42,7 +42,7 @@ impl Add for DateFieldData { | (Self::Other(_), date) | (date, Self::Other(_)) => date, (Self::Year(year), Self::Month(month)) | (Self::Month(month), Self::Year(year)) => { - let new_date = NaiveDate::from_ymd(year, month.number_from_month(), 1); + let new_date = NaiveDate::from_ymd_opt(year, month.number_from_month(), 1).unwrap(); Self::Date(new_date) } (Self::Year(year), Self::Date(date)) | (Self::Date(date), Self::Year(year)) => { diff --git a/support/texlab/src/citation/tests.rs b/support/texlab/src/citation/tests.rs index 16aefea11d..6caff1add0 100644 --- a/support/texlab/src/citation/tests.rs +++ b/support/texlab/src/citation/tests.rs @@ -1,10 +1,10 @@ use insta::assert_snapshot; use rowan::ast::AstNode; -use crate::syntax::bibtex; +use crate::{parser::parse_bibtex, syntax::bibtex}; fn render_entry(input: &str) -> String { - let green = bibtex::parse(input); + let green = parse_bibtex(input); let root = bibtex::Root::cast(bibtex::SyntaxNode::new_root(green)).unwrap(); let entry = root.entries().next().unwrap(); super::render(&entry).unwrap() |