mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
ci: update to Rust 1.76 and fix clippy warnings
This commit is contained in:
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
name: Lint Rust
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RUSTUP_TOOLCHAIN: 1.75.0
|
||||
RUSTUP_TOOLCHAIN: 1.76.0
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -83,11 +83,11 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
rust: 1.75.0
|
||||
rust: 1.76.0
|
||||
- os: windows-latest
|
||||
rust: 1.75.0
|
||||
rust: 1.76.0
|
||||
- os: macos-latest
|
||||
rust: 1.75.0
|
||||
rust: 1.76.0
|
||||
|
||||
# Minimum Supported Rust Version = 1.70.0
|
||||
- os: ubuntu-latest
|
||||
|
||||
12
src/key.rs
12
src/key.rs
@@ -79,7 +79,7 @@ pub(crate) trait DcKey: Serialize + Deserializable + KeyTrait + Clone {
|
||||
}
|
||||
|
||||
pub(crate) async fn load_self_public_key(context: &Context) -> Result<SignedPublicKey> {
|
||||
match context
|
||||
let public_key = context
|
||||
.sql
|
||||
.query_row_optional(
|
||||
"SELECT public_key
|
||||
@@ -91,8 +91,8 @@ pub(crate) async fn load_self_public_key(context: &Context) -> Result<SignedPubl
|
||||
Ok(bytes)
|
||||
},
|
||||
)
|
||||
.await?
|
||||
{
|
||||
.await?;
|
||||
match public_key {
|
||||
Some(bytes) => SignedPublicKey::from_slice(&bytes),
|
||||
None => {
|
||||
let keypair = generate_keypair(context).await?;
|
||||
@@ -102,7 +102,7 @@ pub(crate) async fn load_self_public_key(context: &Context) -> Result<SignedPubl
|
||||
}
|
||||
|
||||
pub(crate) async fn load_self_secret_key(context: &Context) -> Result<SignedSecretKey> {
|
||||
match context
|
||||
let private_key = context
|
||||
.sql
|
||||
.query_row_optional(
|
||||
"SELECT private_key
|
||||
@@ -114,8 +114,8 @@ pub(crate) async fn load_self_secret_key(context: &Context) -> Result<SignedSecr
|
||||
Ok(bytes)
|
||||
},
|
||||
)
|
||||
.await?
|
||||
{
|
||||
.await?;
|
||||
match private_key {
|
||||
Some(bytes) => SignedSecretKey::from_slice(&bytes),
|
||||
None => {
|
||||
let keypair = generate_keypair(context).await?;
|
||||
|
||||
@@ -804,7 +804,7 @@ async fn send_mdn(context: &Context, smtp: &mut Smtp) -> Result<bool> {
|
||||
.sql
|
||||
.execute("DELETE FROM smtp_mdns WHERE retries > 6", [])
|
||||
.await?;
|
||||
let msg_row = match context
|
||||
let Some(msg_row) = context
|
||||
.sql
|
||||
.query_row_optional(
|
||||
"SELECT msg_id, from_id FROM smtp_mdns ORDER BY retries LIMIT 1",
|
||||
@@ -816,9 +816,8 @@ async fn send_mdn(context: &Context, smtp: &mut Smtp) -> Result<bool> {
|
||||
},
|
||||
)
|
||||
.await?
|
||||
{
|
||||
Some(msg_row) => msg_row,
|
||||
None => return Ok(false),
|
||||
else {
|
||||
return Ok(false);
|
||||
};
|
||||
let (msg_id, contact_id) = msg_row;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user