Skip to content

Commit

Permalink
bump rust 1.78
Browse files Browse the repository at this point in the history
  • Loading branch information
nbittich committed May 2, 2024
1 parent a8da4f9 commit 59ed074
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 24 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ libloading = "0.8.3"
nu-ansi-term = "0.50.0"
rustyline = "14.0.0"
rustyline-derive = "0.10.0"
serde = { version = "1.0.198", features = ['serde_derive', 'rc'] }
serde = { version = "1.0.200", features = ['serde_derive', 'rc'] }
serde_json = "1.0.116"
slab_tree = "0.3.2"
strum = { version = "0.26.2", features = ["derive"] }
ctrlc = "3.4.4"
env_logger = { version = "0.11.3", default-features = false }
arboard = "3.3.2"
arboard = "3.4.0"
regex = { version = "1.10.4", default-features = false, features = ["std"] }
serial_test = "3.0.0"
serial_test = "3.1.1"

# wasm
wasm-bindgen = { version = "0.2.92" }
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.76-bookworm as builder
FROM rust:1.78-bookworm as builder

WORKDIR /app

Expand All @@ -10,7 +10,7 @@ COPY . .

RUN cargo build --release

FROM rust:1.76-slim-bookworm
FROM rust:1.78-slim-bookworm

ENV RUST_LOG=info

Expand Down
2 changes: 0 additions & 2 deletions adana-db/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ mod test {

use std::fs::File;

use serde::Serialize;

use crate::{Config, Db, DbOp, Op};

#[test]
Expand Down
2 changes: 1 addition & 1 deletion adana-db/src/in_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl<K: Key + Clone, V: Value + Clone> DbOp<K, V> for InMemoryDb<K, V> {
return Some(false);
}
}
if self.trees.get(tree_name).is_none() {
if !self.trees.contains_key(tree_name) {
self.trees.insert(tree_name.to_string(), Tree::default());
}

Expand Down
Binary file modified adana-script/dynamic_lib/libplugin_example.so
Binary file not shown.
26 changes: 13 additions & 13 deletions adana-script/src/tests/foreach.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn simple_foreach() {
let mut ctx = BTreeMap::new();
let _ = compute(expr, &mut ctx, "N/A").unwrap();
assert_eq!(Primitive::Int(10), ctx["total"].read().unwrap().clone());
assert!(ctx.get("a").is_none());
assert!(!ctx.contains_key("a"));
}

#[test]
Expand Down Expand Up @@ -81,7 +81,7 @@ fn simple_foreach_string() {
]),
ctx["reverted"].read().unwrap().clone()
);
assert!(ctx.get("a").is_none());
assert!(!ctx.contains_key("a"));
}
#[test]
fn simple_foreach_not_assigned() {
Expand All @@ -101,7 +101,7 @@ fn simple_foreach_not_assigned() {
Primitive::String("Hello World How Are Ya ?".into()),
ctx["message"].read().unwrap().clone()
);
assert!(ctx.get("word").is_none());
assert!(!ctx.contains_key("word"));
}

#[test]
Expand All @@ -118,7 +118,7 @@ fn simple_foreach_string_not_assigned() {
Primitive::String("Hello World How Are Ya ?".into()),
ctx["message"].read().unwrap().clone()
);
assert!(ctx.get("letter").is_none());
assert!(!ctx.contains_key("letter"));
}

#[test]
Expand All @@ -142,7 +142,7 @@ fn simple_foreach_break() {
Primitive::String("Hello World How Are Ya".into()),
ctx["message"].read().unwrap().clone()
);
assert!(ctx.get("word").is_none());
assert!(!ctx.contains_key("word"));
}

#[test]
Expand All @@ -166,7 +166,7 @@ fn simple_foreach_return() {
Primitive::String("Hello World How Are".into()),
ctx["message"].read().unwrap().clone()
);
assert!(ctx.get("word").is_none());
assert!(!ctx.contains_key("word"));
}
#[test]
fn simple_foreach_two_depth1() {
Expand Down Expand Up @@ -229,7 +229,7 @@ fn simple_foreach_two_depth1() {
]),
ctx["matrix"].read().unwrap().clone()
);
assert!(ctx.get("depth").is_none());
assert!(!ctx.contains_key("depth"));
}

#[test]
Expand All @@ -247,7 +247,7 @@ fn simple_foreach_with_idx1() {
let _ = compute(expr, &mut ctx, "N/A").unwrap();
assert_eq!(Primitive::Int(10), ctx["total"].read().unwrap().clone());
assert_eq!(Primitive::Int(6), ctx["idx_total"].read().unwrap().clone());
assert!(ctx.get("a").is_none());
assert!(!ctx.contains_key("a"));
}
#[test]
fn simple_foreach_with_idx_from_fn() {
Expand All @@ -264,7 +264,7 @@ fn simple_foreach_with_idx_from_fn() {
let _ = compute(expr, &mut ctx, "N/A").unwrap();
assert_eq!(Primitive::Int(10), ctx["total"].read().unwrap().clone());
assert_eq!(Primitive::Int(6), ctx["idx_total"].read().unwrap().clone());
assert!(ctx.get("a").is_none());
assert!(!ctx.contains_key("a"));
}
#[test]
fn simple_foreach_with_idx_from_struct() {
Expand All @@ -283,7 +283,7 @@ fn simple_foreach_with_idx_from_struct() {
let _ = compute(expr, &mut ctx, "N/A").unwrap();
assert_eq!(Primitive::Int(10), ctx["total"].read().unwrap().clone());
assert_eq!(Primitive::Int(6), ctx["idx_total"].read().unwrap().clone());
assert!(ctx.get("a").is_none());
assert!(!ctx.contains_key("a"));
}

#[test]
Expand All @@ -298,7 +298,7 @@ fn simple_foreach_with_paren() {
let mut ctx = BTreeMap::new();
let _ = compute(expr, &mut ctx, "N/A").unwrap();
assert_eq!(Primitive::Int(10), ctx["total"].read().unwrap().clone());
assert!(ctx.get("a").is_none());
assert!(!ctx.contains_key("a"));
}

#[test]
Expand All @@ -316,7 +316,7 @@ fn simple_foreach_with_idx_with_paren() {
let _ = compute(expr, &mut ctx, "N/A").unwrap();
assert_eq!(Primitive::Int(10), ctx["total"].read().unwrap().clone());
assert_eq!(Primitive::Int(6), ctx["idx_total"].read().unwrap().clone());
assert!(ctx.get("a").is_none());
assert!(!ctx.contains_key("a"));
}

#[test]
Expand All @@ -336,7 +336,7 @@ fn simple_foreach_with_idx_from_struct_with_paren() {
let _ = compute(expr, &mut ctx, "N/A").unwrap();
assert_eq!(Primitive::Int(10), ctx["total"].read().unwrap().clone());
assert_eq!(Primitive::Int(6), ctx["idx_total"].read().unwrap().clone());
assert!(ctx.get("a").is_none());
assert!(!ctx.contains_key("a"));
}

#[test]
Expand Down
6 changes: 3 additions & 3 deletions adana-script/src/tests/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn simple_foreach_range() {
let mut ctx = BTreeMap::new();
let _ = compute(expr, &mut ctx, "N/A").unwrap();
assert_eq!(Primitive::Int(10), ctx["total"].read().unwrap().clone());
assert!(ctx.get("a").is_none());
assert!(!ctx.contains_key("a"));
}
#[test]
fn simple_range() {
Expand All @@ -32,7 +32,7 @@ fn simple_range() {
]),
ctx["arr"].read().unwrap().clone()
);
assert!(ctx.get("a").is_none());
assert!(!ctx.contains_key("a"));
}
#[test]
fn simple_range_in_array() {
Expand Down Expand Up @@ -156,5 +156,5 @@ fn simple_foreach_range_both_end() {
let mut ctx = BTreeMap::new();
let _ = compute(expr, &mut ctx, "N/A").unwrap();
assert_eq!(Primitive::Int(15), ctx["total"].read().unwrap().clone());
assert!(ctx.get("a").is_none());
assert!(!ctx.contains_key("a"));
}

0 comments on commit 59ed074

Please sign in to comment.