WIP
This commit is contained in:
parent
290eb8e519
commit
cdc3bc6bde
6 changed files with 9 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"Richard Newman <rnewman@twinql.com>",
|
||||
"Nicholas Alexander <nalexander@mozilla.com>",
|
||||
|
@ -14,7 +14,7 @@ authors = [
|
|||
"Gregory Burd <greg@burd.me>",
|
||||
]
|
||||
name = "mentat"
|
||||
version = "0.13.0"
|
||||
version = "0.14.0"
|
||||
build = "build/version.rs"
|
||||
|
||||
[features]
|
||||
|
|
2
Makefile
2
Makefile
|
@ -6,3 +6,5 @@ outdated:
|
|||
fix:
|
||||
$(for p in $(dirname $(ls Cargo.toml */Cargo.toml */*/Cargo.toml)); do echo $p; (cd $p; cargo fix --allow-dirty --broken-code --edition-idioms); done)
|
||||
|
||||
upgrades:
|
||||
cargo upgrades
|
||||
|
|
|
@ -14,7 +14,7 @@ use std::process::exit;
|
|||
|
||||
/// MIN_VERSION should be changed when there's a new minimum version of rustc required
|
||||
/// to build the project.
|
||||
static MIN_VERSION: &str = "1.43.0";
|
||||
static MIN_VERSION: &str = "1.69.0";
|
||||
|
||||
fn main() {
|
||||
let ver = version().unwrap();
|
||||
|
|
|
@ -1028,8 +1028,8 @@ impl ParsedQuery {
|
|||
Ok(ParsedQuery {
|
||||
find_spec: find_spec.ok_or("expected :find")?,
|
||||
default_source: SrcVar::DefaultSrc,
|
||||
with: with.unwrap_or_else(Vec::new), //
|
||||
in_vars: in_vars.unwrap_or_else(Vec::new),
|
||||
with: with.unwrap_or_default(),
|
||||
in_vars: in_vars.unwrap_or_default(),
|
||||
in_sources: BTreeSet::default(),
|
||||
limit: limit.unwrap_or(Limit::None),
|
||||
where_clauses: where_clauses.ok_or("expected :where")?,
|
||||
|
|
|
@ -690,7 +690,7 @@ pub trait FromMillis {
|
|||
|
||||
impl FromMillis for DateTime<Utc> {
|
||||
fn from_millis(ts: i64) -> Self {
|
||||
Utc.timestamp_opt(ts / 1_000, ((ts % 1_000).abs() as u32) * 1_000).unwrap()
|
||||
Utc.timestamp_opt(ts / 1_000, ((ts % 1_000).unsigned_abs() as u32) * 1_000).unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ use crate::types::Value;
|
|||
/// TODO: implement `merge` for [Value], following the `concat`/`SliceConcatExt` pattern.
|
||||
pub fn merge(left: &Value, right: &Value) -> Option<Value> {
|
||||
match (left, right) {
|
||||
(&Value::Map(ref l), &Value::Map(ref r)) => {
|
||||
(Value::Map(l), Value::Map(r)) => {
|
||||
let mut result = l.clone();
|
||||
result.extend(r.clone());
|
||||
Some(Value::Map(result))
|
||||
|
|
Loading…
Reference in a new issue