mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 02:09:06 +00:00
clippy all codes (#1214)
1. clippy code 2. add fmt and clippy check in ci
This commit is contained in:
@@ -94,14 +94,10 @@ impl SessionRpcService {
|
||||
return Ok(HeartbeatResponse {});
|
||||
};
|
||||
|
||||
let machine_id: uuid::Uuid =
|
||||
let machine_id: uuid::Uuid = req.machine_id.map(Into::into).ok_or(anyhow::anyhow!(
|
||||
"Machine id is not set correctly, expect uuid but got: {:?}",
|
||||
req.machine_id
|
||||
.clone()
|
||||
.map(Into::into)
|
||||
.ok_or(anyhow::anyhow!(
|
||||
"Machine id is not set correctly, expect uuid but got: {:?}",
|
||||
req.machine_id
|
||||
))?;
|
||||
))?;
|
||||
|
||||
let user_id = storage
|
||||
.db()
|
||||
@@ -121,7 +117,7 @@ impl SessionRpcService {
|
||||
if data.req.replace(req.clone()).is_none() {
|
||||
assert!(data.storage_token.is_none());
|
||||
data.storage_token = Some(StorageToken {
|
||||
token: req.user_token.clone().into(),
|
||||
token: req.user_token.clone(),
|
||||
client_url: data.client_url.clone(),
|
||||
machine_id,
|
||||
user_id,
|
||||
|
||||
Reference in New Issue
Block a user