Implement new config module

next
Sayan Nandan 1 year ago
parent 6a01d9d513
commit 190220127c
No known key found for this signature in database
GPG Key ID: 42EEDF4AE9D96B54

20
Cargo.lock generated

@ -1280,6 +1280,19 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "serde_yaml"
version = "0.9.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574"
dependencies = [
"indexmap",
"itoa",
"ryu",
"serde",
"unsafe-libyaml",
]
[[package]] [[package]]
name = "sha1" name = "sha1"
version = "0.10.5" version = "0.10.5"
@ -1394,6 +1407,7 @@ dependencies = [
"rcrypt", "rcrypt",
"regex", "regex",
"serde", "serde",
"serde_yaml",
"sky_macros", "sky_macros",
"skytable 0.8.0 (git+https://github.com/skytable/client-rust?branch=next)", "skytable 0.8.0 (git+https://github.com/skytable/client-rust?branch=next)",
"tokio", "tokio",
@ -1684,6 +1698,12 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
[[package]]
name = "unsafe-libyaml"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa"
[[package]] [[package]]
name = "utf8parse" name = "utf8parse"
version = "0.2.1" version = "0.2.1"

@ -29,6 +29,7 @@ toml = "0.7.6"
base64 = "0.21.2" base64 = "0.21.2"
uuid = { version = "1.4.1", features = ["v4", "fast-rng", "macro-diagnostics"] } uuid = { version = "1.4.1", features = ["v4", "fast-rng", "macro-diagnostics"] }
crc = "3.0.1" crc = "3.0.1"
serde_yaml = "0.9"
[target.'cfg(all(not(target_env = "msvc"), not(miri)))'.dependencies] [target.'cfg(all(not(target_env = "msvc"), not(miri)))'.dependencies]
# external deps # external deps

File diff suppressed because it is too large Load Diff

@ -24,6 +24,11 @@
* *
*/ */
#[cfg(test)]
macro_rules! into_array {
($($e:expr),* $(,)?) => { [$($e.into()),*] };
}
macro_rules! extract { macro_rules! extract {
($src:expr, $what:pat => $ret:expr) => { ($src:expr, $what:pat => $ret:expr) => {
if let $what = $src { if let $what = $src {

@ -28,6 +28,7 @@
#[macro_use] #[macro_use]
mod macros; mod macros;
mod config;
mod core; mod core;
mod data; mod data;
mod error; mod error;

@ -294,11 +294,6 @@ macro_rules! dict_nullable {
}}; }};
} }
#[cfg(test)]
macro_rules! into_array {
($($e:expr),* $(,)?) => { [$($e.into()),*] };
}
#[cfg(test)] #[cfg(test)]
macro_rules! into_array_nullable { macro_rules! into_array_nullable {
($($e:expr),* $(,)?) => { [$($crate::engine::ql::tests::nullable_datatype($e)),*] }; ($($e:expr),* $(,)?) => { [$($crate::engine::ql::tests::nullable_datatype($e)),*] };

@ -35,7 +35,7 @@ use {
crate::IoResult, crate::IoResult,
std::{ std::{
ffi::OsStr, ffi::OsStr,
fs, fmt, fs,
path::Path, path::Path,
time::{SystemTime, UNIX_EPOCH}, time::{SystemTime, UNIX_EPOCH},
}, },
@ -58,6 +58,12 @@ impl From<std::io::ErrorKind> for SysIOError {
} }
} }
impl fmt::Display for SysIOError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.0.fmt(f)
}
}
#[cfg(test)] #[cfg(test)]
impl PartialEq for SysIOError { impl PartialEq for SysIOError {
fn eq(&self, other: &Self) -> bool { fn eq(&self, other: &Self) -> bool {

Loading…
Cancel
Save