ci: install openssl, fix clippy (#513)

* add openssl

* typos -w

* macro

* lint

* patch

* fix
This commit is contained in:
hinto-janai
2025-07-03 13:03:14 +00:00
committed by GitHub
parent b6bd4ffb1f
commit b6a0302c81
5 changed files with 9 additions and 9 deletions

View File

@@ -154,9 +154,9 @@ jobs:
os: os:
# TODO: support musl <https://github.com/Cuprate/cuprate/issues/336> # TODO: support musl <https://github.com/Cuprate/cuprate/issues/336>
# - { image: alpine:latest, commands: "apk update && apk add alpine-sdk cmake curl bash" } # - { 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: 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" } - { 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" } - { image: fedora:latest, commands: "dnf install --assumeyes @development-tools gcc gcc-c++ cmake git openssl-devel" }
steps: steps:
- name: Checkout - name: Checkout

View File

@@ -16,7 +16,7 @@ The currently implemented backends are:
- [`heed`](https://github.com/meilisearch/heed) (LMDB) - [`heed`](https://github.com/meilisearch/heed) (LMDB)
- [`redb`](https://github.com/cberner/redb) - [`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. crates interact with instead of using any particular backend implementation.
This allows the backend to be swapped and/or future backends to be implemented. This allows the backend to be swapped and/or future backends to be implemented.

View File

@@ -79,7 +79,7 @@ mod tests {
let array = [1_u8, 2, 3, 4, 5]; let array = [1_u8, 2, 3, 4, 5];
let sub: &[u8; 3] = subarray(&array, 1); let sub: &[u8; 3] = subarray(&array, 1);
assert_eq!(sub, &[2, 3, 4]); 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] #[test]

View File

@@ -127,7 +127,7 @@ macro_rules! epee_object {
) => { ) => {
cuprate_epee_encoding::macros::paste!( cuprate_epee_encoding::macros::paste!(
#[allow(non_snake_case)] #[allow(non_snake_case, clippy::empty_structs_with_brackets)]
mod [<__epee_builder_ $obj>] { mod [<__epee_builder_ $obj>] {
use super::*; use super::*;

View File

@@ -94,7 +94,7 @@ macro_rules! define_request_and_response {
} }
) => { paste::paste! { ) => { paste::paste! {
$crate::macros::define_request! { $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!( #[doc = $crate::macros::define_request_and_response_doc!(
"response" => [<$type_name Response>], "response" => [<$type_name Response>],
$monero_daemon_rpc_doc_link, $monero_daemon_rpc_doc_link,
@@ -119,7 +119,7 @@ macro_rules! define_request_and_response {
} }
$crate::macros::define_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))] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[doc = $crate::macros::define_request_and_response_doc!( #[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))] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
$( #[$attr] )* $( #[$attr] )*