Skip to content

Commit

Permalink
chore: bump to rust 1.79
Browse files Browse the repository at this point in the history
  • Loading branch information
nbittich committed Jun 15, 2024
1 parent bba7bea commit 2f72fb6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 24 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description = "namespaces aliases for command lines & basic scripting language"
homepage = "https://github.com/nbittich/adana"
repository = "https://github.com/nbittich/adana"
readme = "README.md"
rust-version = "1.78"
rust-version = "1.79"
edition = "2021"
license = "MIT"
exclude = ["vscode/", "dist/", ".vscode", ".history", ".git", ".github"]
Expand All @@ -39,7 +39,7 @@ strum = { version = "0.26.2", features = ["derive"] }
ctrlc = "3.4.4"
env_logger = { version = "0.11.3", default-features = false }
arboard = "3.4.0"
regex = { version = "1.10.4", default-features = false, features = ["std"] }
regex = { version = "1.10.5", default-features = false, features = ["std"] }
serial_test = "3.1.1"

# wasm
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.78-bookworm as builder
FROM rust:1.79-bookworm as builder

WORKDIR /app

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

RUN cargo build --release

FROM rust:1.78-slim-bookworm
FROM rust:1.79-slim-bookworm

ENV RUST_LOG=info

Expand Down
18 changes: 4 additions & 14 deletions adana-db/src/file_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,13 @@ where
}

fn drop_tree(&mut self, tree_name: &str) -> bool {
if let Some(res) =
self.update(|mut guard| Some(guard.drop_tree(tree_name)))
{
res
} else {
false
}
self.update(|mut guard| Some(guard.drop_tree(tree_name)))
.unwrap_or_default()
}

fn clear_tree(&mut self, tree_name: &str) -> bool {
if let Some(res) =
self.update(|mut guard| Some(guard.clear_tree(tree_name)))
{
res
} else {
false
}
self.update(|mut guard| Some(guard.clear_tree(tree_name)))
.unwrap_or_default()
}

fn merge_trees(
Expand Down
6 changes: 1 addition & 5 deletions adana-shell/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,7 @@ pub fn read_line(
} else {
let shorter_path = {
// we try to keep only the last part of the path
if let Some(path) = path.split(MAIN_SEPARATOR).last() {
path
} else {
""
}
path.split(MAIN_SEPARATOR).last().unwrap_or_default()
};

if real_w > curr_cache.len() + branch.len() + shorter_path.len() {
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.78"
channel = "1.79"

0 comments on commit 2f72fb6

Please sign in to comment.