Skip to content

Commit

Permalink
linera-client: clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Twey committed Sep 1, 2024
1 parent 6655a9a commit c06917f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion linera-client/src/client_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ impl ClientOptions {

#[cfg(not(with_persist))]
impl ClientOptions {
pub fn wallet(&self) -> Result<WalletState<persistent::Memory<Wallet>>, Error> {
pub async fn wallet(&self) -> Result<WalletState<persistent::Memory<Wallet>>, Error> {
#![allow(unreachable_code)]
let _wallet = unimplemented!("No persistence backend selected for wallet; please use one of the `fs` or `indexed-db` features");
Ok(WalletState::new(persistent::Memory::new(_wallet)))
Expand Down
7 changes: 1 addition & 6 deletions linera-client/src/persistent/indexed_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,7 @@ impl<T: serde::Serialize + serde::de::DeserializeOwned> IndexedDb<T> {
) -> Result<Result<Self, E>, Error> {
let mut db_req = IdbDatabase::open_u32(DATABASE_NAME, 1)?;
db_req.set_on_upgrade_needed(Some(|evt: &IdbVersionChangeEvent| -> Result<(), JsValue> {
if evt
.db()
.object_store_names()
.find(|n| n == STORE_NAME)
.is_none()
{
if !evt.db().object_store_names().any(|n| n == STORE_NAME) {
evt.db().create_object_store(STORE_NAME)?;
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion linera-client/src/persistent/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub trait LocalPersist: Deref {

/// Get a mutable reference to the value. This is not expressed as a
/// [`DerefMut`](std::ops::DerefMut) bound because it is discouraged to consume this
/// function! Instead, use [`mutate`].
/// function! Instead, use `mutate`.
fn as_mut(&mut self) -> &mut Self::Target;

/// Saves the value to persistent storage.
Expand Down

0 comments on commit c06917f

Please sign in to comment.