ci: Use clippy instead of check for wasm checks

This commit is contained in:
Jonas Platte
2022-03-10 11:28:55 +01:00
parent c01475701d
commit ea2c9a2986
6 changed files with 8 additions and 5 deletions

View File

@@ -44,6 +44,7 @@ jobs:
with:
toolchain: stable
target: wasm32-unknown-unknown
components: clippy
profile: minimal
override: true

View File

@@ -204,7 +204,7 @@ impl IndexeddbStore {
let db: IdbDatabase = db_req.into_future().await?;
let tx: IdbTransaction =
let tx: IdbTransaction<'_> =
db.transaction_on_one_with_mode("matrix-sdk-crypto", IdbTransactionMode::Readwrite)?;
let ob = tx.object_store("matrix-sdk-crypto")?;
@@ -918,6 +918,7 @@ impl CryptoStore for IndexeddbStore {
self.users_for_key_query()
}
#[allow(clippy::todo)]
async fn load_backup_keys(&self) -> Result<BackupKeys, CryptoStoreError> {
todo!()
}

View File

@@ -217,7 +217,7 @@ impl IndexeddbStore {
let db: IdbDatabase = db_req.into_future().await?;
let tx: IdbTransaction =
let tx: IdbTransaction<'_> =
db.transaction_on_one_with_mode("matrix-sdk-state", IdbTransactionMode::Readwrite)?;
let ob = tx.object_store("matrix-sdk-state")?;

View File

@@ -1104,7 +1104,7 @@ impl Client {
/// [`get_sso_login_url`]: #method.get_sso_login_url
/// [`restore_login`]: #method.restore_login
#[instrument(skip(token))]
#[deny(clippy::future_not_send)]
#[cfg_attr(not(target_arch = "wasm32"), deny(clippy::future_not_send))]
pub async fn login_with_token(
&self,
token: &str,

View File

@@ -137,7 +137,7 @@ mod store_helpers {
) -> Result<Box<StateStore>> {
Ok(Box::new(match passphrase {
Some(pass) => StateStore::open_with_passphrase(name.to_owned(), pass).await?,
_ => StateStore::open_with_name(name.to_string()).await?,
_ => StateStore::open_with_name(name.to_owned()).await?,
}))
}
}

View File

@@ -185,8 +185,9 @@ fn run_wasm_checks(cmd: Option<WasmFeatureSet>) -> Result<()> {
]);
let run = |arg_set: &str| {
cmd!("rustup run stable cargo check --target wasm32-unknown-unknown")
cmd!("rustup run stable cargo clippy --target wasm32-unknown-unknown")
.args(arg_set.split_whitespace())
.args(["--", "-D", "warnings"])
.run()
};