diff options
author | Norbert Preining <norbert@preining.info> | 2022-12-30 03:01:26 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-12-30 03:01:26 +0000 |
commit | 844019377157163b461e0fd4a66592e61963a530 (patch) | |
tree | 32f61991c6a5acc3a3359ffc2cdefdd2aa004268 /support/texlab/src/citation | |
parent | 55c69feeef908f49007708be194b7bb1c607f302 (diff) |
CTAN sync 202212300301
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() |