Skip to content

Commit cf0a383

Browse files
committed
chore: fix some warnings
1 parent 4cd6755 commit cf0a383

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

crates/rostra-client-db/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ pub enum DbError {
110110
location: Location,
111111
},
112112
Transaction {
113-
source: redb::TransactionError,
113+
#[snafu(source(from(redb::TransactionError, Box::new)))]
114+
source: Box<redb::TransactionError>,
114115
#[snafu(implicit)]
115116
location: Location,
116117
},

crates/rostra-client/src/client.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ pub struct ClientRefError {
5858
pub type ClientRefResult<T> = Result<T, ClientRefError>;
5959

6060
#[derive(Debug)]
61+
#[allow(clippy::large_enum_variant)]
6162
pub enum ClientMode {
6263
Full(Database),
6364
Light,

crates/rostra-core/src/event/content_kind/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ where
88
T: ::serde::Serialize + for<'de> ::serde::Deserialize<'de> + fmt::Debug + cmp::Eq,
99
{
1010
let json = serde_json::to_string(&v).expect("Can't fail");
11-
println!("json: {}", json);
11+
println!("json: {json}");
1212
let json_ret = serde_json::from_str(&json).expect("Can't fail");
1313
assert_eq!(v, json_ret);
1414

crates/rostra-p2p/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub mod util;
55
pub use connection::Connection;
66
use rostra_core::event::VerifiedEventError;
77
use rostra_util_error::BoxedError;
8-
use snafu::{Snafu, Whatever};
8+
use snafu::Snafu;
99
pub const ROSTRA_P2P_V0_ALPN: &[u8] = b"rostra-p2p-v0";
1010

1111
pub const LOG_TARGET: &str = "rostra::p2p";

crates/rostra-web-ui/src/error.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,13 @@ pub enum UnlockError {
5252
source: DbError,
5353
},
5454
Init {
55-
source: InitError,
55+
#[snafu(source(from(InitError, Box::new)))]
56+
source: Box<InitError>,
5657
},
5758
#[snafu(transparent)]
5859
MultiClient {
59-
source: MultiClientError,
60+
#[snafu(source(from(MultiClientError, Box::new)))]
61+
source: Box<MultiClientError>,
6062
},
6163
#[snafu(transparent)]
6264
MultiClientActivate {

0 commit comments

Comments
 (0)