mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-19 09:34:18 +01: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:
6
Cargo.lock
generated
6
Cargo.lock
generated
@@ -1017,10 +1017,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
|
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"js-sys",
|
|
||||||
"libc",
|
"libc",
|
||||||
"wasi 0.11.0+wasi-snapshot-preview1",
|
"wasi 0.11.0+wasi-snapshot-preview1",
|
||||||
"wasm-bindgen",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1452,9 +1450,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "julian_day_converter"
|
name = "julian_day_converter"
|
||||||
version = "0.3.4"
|
version = "0.4.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2e5c45e06fa273ed7800f954d1cb6054b9b07115b370da56185f506700c0e3aa"
|
checksum = "1aa5652b85ab018289638c6b924db618da9edd2ddfff7fa0ec38a8b51a9192d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -49,11 +49,12 @@ libc = "0.2.155"
|
|||||||
log = "0.4.20"
|
log = "0.4.20"
|
||||||
sqlite3-parser = { path = "../vendored/sqlite3-parser" }
|
sqlite3-parser = { path = "../vendored/sqlite3-parser" }
|
||||||
thiserror = "1.0.61"
|
thiserror = "1.0.61"
|
||||||
getrandom = { version = "0.2.15", features = ["js"] }
|
getrandom = { version = "0.2.15" }
|
||||||
regex = "1.11.1"
|
regex = "1.11.1"
|
||||||
regex-syntax = { version = "0.8.5", default-features = false, features = ["unicode"] }
|
regex-syntax = { version = "0.8.5", default-features = false, features = ["unicode"] }
|
||||||
chrono = "0.4.38"
|
|
||||||
julian_day_converter = "0.3.2"
|
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 }
|
jsonb = { version = "0.4.4", optional = true }
|
||||||
indexmap = { version = "2.2.6", features = ["serde"] }
|
indexmap = { version = "2.2.6", features = ["serde"] }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
@@ -75,7 +76,7 @@ crossbeam-skiplist = "0.1.3"
|
|||||||
ryu = "1.0.19"
|
ryu = "1.0.19"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
chrono = "0.4.38"
|
chrono = { version = "0.4.38", default-features = false }
|
||||||
built = { version = "0.7.5", features = ["git2", "chrono"] }
|
built = { version = "0.7.5", features = ["git2", "chrono"] }
|
||||||
|
|
||||||
[target.'cfg(not(target_family = "windows"))'.dev-dependencies]
|
[target.'cfg(not(target_family = "windows"))'.dev-dependencies]
|
||||||
|
|||||||
@@ -1536,11 +1536,13 @@ mod tests {
|
|||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_apply_modifier_julianday() {
|
fn test_apply_modifier_julianday() {
|
||||||
|
use julian_day_converter::*;
|
||||||
|
|
||||||
let dt = create_datetime(2000, 1, 1, 12, 0, 0);
|
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();
|
let mut dt_result = NaiveDateTime::default();
|
||||||
if let Ok(result) = julian_day_converter::julian_day_to_datetime(julian_day) {
|
if let Some(ndt) = JulianDay::from_jd(*julian_day) {
|
||||||
dt_result = result;
|
dt_result = ndt;
|
||||||
}
|
}
|
||||||
assert_eq!(dt_result, dt);
|
assert_eq!(dt_result, dt);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user