From b6a0302c8189187c7b85059c81086858bd4e4352 Mon Sep 17 00:00:00 2001 From: hinto-janai Date: Thu, 3 Jul 2025 13:03:14 +0000 Subject: [PATCH] ci: install openssl, fix clippy (#513) * add openssl * typos -w * macro * lint * patch * fix --- .github/workflows/ci.yml | 6 +++--- books/architecture/src/storage/db/intro.md | 2 +- cryptonight/src/util.rs | 2 +- net/epee-encoding/src/macros.rs | 2 +- rpc/types/src/macros.rs | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79930a8..b07be40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,9 +154,9 @@ jobs: os: # TODO: support musl # - { image: alpine:latest, commands: "apk update && apk add alpine-sdk cmake curl bash" } - - { image: archlinux:latest, commands: "pacman -Syyu --noconfirm base-devel git cmake" } - - { image: debian:stable, commands: "apt update && apt -y install build-essential curl cmake git" } - - { image: fedora:latest, commands: "dnf install --assumeyes @development-tools gcc gcc-c++ cmake git" } + - { image: archlinux:latest, commands: "pacman -Syyu --noconfirm base-devel git cmake openssl" } + - { image: debian:stable, commands: "apt update && apt -y install build-essential curl cmake git libssl-dev" } + - { image: fedora:latest, commands: "dnf install --assumeyes @development-tools gcc gcc-c++ cmake git openssl-devel" } steps: - name: Checkout diff --git a/books/architecture/src/storage/db/intro.md b/books/architecture/src/storage/db/intro.md index 5973fbe..dd51f93 100644 --- a/books/architecture/src/storage/db/intro.md +++ b/books/architecture/src/storage/db/intro.md @@ -16,7 +16,7 @@ The currently implemented backends are: - [`heed`](https://github.com/meilisearch/heed) (LMDB) - [`redb`](https://github.com/cberner/redb) -Said precicely, `cuprate_database` is the embedded database other Cuprate +Said precisely, `cuprate_database` is the embedded database other Cuprate crates interact with instead of using any particular backend implementation. This allows the backend to be swapped and/or future backends to be implemented. diff --git a/cryptonight/src/util.rs b/cryptonight/src/util.rs index de8b70b..2921397 100644 --- a/cryptonight/src/util.rs +++ b/cryptonight/src/util.rs @@ -79,7 +79,7 @@ mod tests { let array = [1_u8, 2, 3, 4, 5]; let sub: &[u8; 3] = subarray(&array, 1); assert_eq!(sub, &[2, 3, 4]); - assert!(std::ptr::eq(&array[1], &sub[0])); // same memory, not copy + assert!(std::ptr::eq(&raw const array[1], &raw const sub[0])); // same memory, not copy } #[test] diff --git a/net/epee-encoding/src/macros.rs b/net/epee-encoding/src/macros.rs index c1b4568..269e438 100644 --- a/net/epee-encoding/src/macros.rs +++ b/net/epee-encoding/src/macros.rs @@ -127,7 +127,7 @@ macro_rules! epee_object { ) => { cuprate_epee_encoding::macros::paste!( - #[allow(non_snake_case)] + #[allow(non_snake_case, clippy::empty_structs_with_brackets)] mod [<__epee_builder_ $obj>] { use super::*; diff --git a/rpc/types/src/macros.rs b/rpc/types/src/macros.rs index 27ccbf6..da5c9ce 100644 --- a/rpc/types/src/macros.rs +++ b/rpc/types/src/macros.rs @@ -94,7 +94,7 @@ macro_rules! define_request_and_response { } ) => { paste::paste! { $crate::macros::define_request! { - #[allow(dead_code, missing_docs, reason = "inside a macro")] + #[allow(dead_code, missing_docs, clippy::empty_structs_with_brackets, reason = "inside a macro")] #[doc = $crate::macros::define_request_and_response_doc!( "response" => [<$type_name Response>], $monero_daemon_rpc_doc_link, @@ -119,7 +119,7 @@ macro_rules! define_request_and_response { } $crate::macros::define_response! { - #[allow(dead_code, missing_docs, reason = "inside a macro")] + #[allow(dead_code, missing_docs, clippy::empty_structs_with_brackets, reason = "inside a macro")] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] #[doc = $crate::macros::define_request_and_response_doc!( @@ -236,7 +236,7 @@ macro_rules! define_request { )* } ) => { - #[allow(dead_code, missing_docs, reason = "inside a macro")] + #[allow(dead_code, missing_docs, clippy::empty_structs_with_brackets, reason = "inside a macro")] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] $( #[$attr] )*