Skip to content

Commit 4874a9a

Browse files
committed
(fix) v2.1.14
1 parent 4d6579a commit 4874a9a

File tree

5 files changed

+109
-3
lines changed

5 files changed

+109
-3
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

flake.lock

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
description = "A Nix-flake-based Rust development environment";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6+
rust-overlay = {
7+
url = "github:oxalica/rust-overlay";
8+
inputs.nixpkgs.follows = "nixpkgs";
9+
};
10+
};
11+
12+
outputs = { self, nixpkgs, rust-overlay }:
13+
let
14+
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
15+
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
16+
pkgs = import nixpkgs {
17+
inherit system;
18+
overlays = [ rust-overlay.overlays.default self.overlays.default ];
19+
};
20+
});
21+
in
22+
{
23+
overlays.default = final: prev: {
24+
rustToolchain =
25+
let
26+
rust = prev.rust-bin;
27+
in
28+
if builtins.pathExists ./rust-toolchain.toml then
29+
rust.fromRustupToolchainFile ./rust-toolchain.toml
30+
else if builtins.pathExists ./rust-toolchain then
31+
rust.fromRustupToolchainFile ./rust-toolchain
32+
else
33+
rust.stable.latest.default.override {
34+
extensions = [ "rust-src" "rustfmt" ];
35+
};
36+
};
37+
38+
devShells = forEachSupportedSystem ({ pkgs }: {
39+
default = pkgs.mkShell {
40+
packages = with pkgs; [
41+
rustToolchain
42+
openssl
43+
pkg-config
44+
cargo-deny
45+
cargo-edit
46+
cargo-watch
47+
rust-analyzer
48+
];
49+
50+
env = {
51+
# Required by rust-analyzer
52+
RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library";
53+
};
54+
};
55+
});
56+
};
57+
}

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[toolchain]
2-
channel = "1.79.0"
2+
channel = "1.81.0"

src/geyser_plugin_postgres.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ impl GeyserPlugin for GeyserPluginPostgres {
311311
Ok(())
312312
}
313313

314-
fn update_slot_status(&self, slot: u64, parent: Option<u64>, status: SlotStatus) -> Result<()> {
314+
fn update_slot_status(&self, slot: u64, parent: Option<u64>, status: &SlotStatus) -> Result<()> {
315315
info!("Updating slot {:?} at with status {:?}", slot, status);
316316

317317
match &self.client {
@@ -323,7 +323,7 @@ impl GeyserPlugin for GeyserPluginPostgres {
323323
)));
324324
}
325325
Some(client) => {
326-
let result = client.update_slot_status(slot, parent, status);
326+
let result = client.update_slot_status(slot, parent, status.clone());
327327

328328
if let Err(err) = result {
329329
return Err(GeyserPluginError::SlotStatusUpdateError{

0 commit comments

Comments
 (0)