mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 01:58:16 +00:00
restrict chrono
to no-dfault-features, update julian_day_converter
chrono has default features that are incompatible with some targets, such as non-js WebAssembly. Removing the unused defaults allows limbo to compile to these targets
This commit is contained in:
parent
1da43266e9
commit
0423945803
3 changed files with 11 additions and 10 deletions
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -1017,10 +1017,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"libc",
|
||||
"wasi 0.11.0+wasi-snapshot-preview1",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1452,9 +1450,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "julian_day_converter"
|
||||
version = "0.3.4"
|
||||
version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2e5c45e06fa273ed7800f954d1cb6054b9b07115b370da56185f506700c0e3aa"
|
||||
checksum = "1aa5652b85ab018289638c6b924db618da9edd2ddfff7fa0ec38a8b51a9192d3"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
]
|
||||
|
|
|
@ -49,11 +49,12 @@ libc = "0.2.155"
|
|||
log = "0.4.20"
|
||||
sqlite3-parser = { path = "../vendored/sqlite3-parser" }
|
||||
thiserror = "1.0.61"
|
||||
getrandom = { version = "0.2.15", features = ["js"] }
|
||||
getrandom = { version = "0.2.15" }
|
||||
regex = "1.11.1"
|
||||
regex-syntax = { version = "0.8.5", default-features = false, features = ["unicode"] }
|
||||
chrono = "0.4.38"
|
||||
julian_day_converter = "0.3.2"
|
||||
chrono = { version = "0.4.38", default-features = false, features = ["clock"] }
|
||||
julian_day_converter = "0.4.4"
|
||||
jsonb = { version = "0.4.4", optional = true }
|
||||
indexmap = { version = "2.2.6", features = ["serde"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
@ -75,7 +76,7 @@ crossbeam-skiplist = "0.1.3"
|
|||
ryu = "1.0.19"
|
||||
|
||||
[build-dependencies]
|
||||
chrono = "0.4.38"
|
||||
chrono = { version = "0.4.38", default-features = false }
|
||||
built = { version = "0.7.5", features = ["git2", "chrono"] }
|
||||
|
||||
[target.'cfg(not(target_family = "windows"))'.dev-dependencies]
|
||||
|
|
|
@ -1536,11 +1536,13 @@ mod tests {
|
|||
#[allow(deprecated)]
|
||||
#[test]
|
||||
fn test_apply_modifier_julianday() {
|
||||
use julian_day_converter::*;
|
||||
|
||||
let dt = create_datetime(2000, 1, 1, 12, 0, 0);
|
||||
let julian_day = julian_day_converter::datetime_to_julian_day(&dt.to_string()).unwrap();
|
||||
let julian_day = &dt.to_jd();
|
||||
let mut dt_result = NaiveDateTime::default();
|
||||
if let Ok(result) = julian_day_converter::julian_day_to_datetime(julian_day) {
|
||||
dt_result = result;
|
||||
if let Some(ndt) = JulianDay::from_jd(*julian_day) {
|
||||
dt_result = ndt;
|
||||
}
|
||||
assert_eq!(dt_result, dt);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue