Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
S0c5 committed Jul 25, 2024
1 parent f99a88a commit a599105
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sube/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ async fn get_multi_backend_by_url<'a>(
let backend = Box::new(get_backend_by_url(url.clone()).await?);
let backend = Box::leak::<'static>(backend);

instance_backend.insert(base_path.clone(), backend);
instance_backend.insert(base_path.clone(), backend).map_err(|_| Error::CantInitBackend)?;

let metadata = Box::new(get_metadata(backend, metadata).await?);
let metadata = Box::leak::<'static>(metadata);

instance_metadata.insert(base_path.clone(), metadata);
instance_metadata.insert(base_path.clone(), metadata).map_err(|_| Error::BadMetadata)?;

Ok((backend, metadata))
}
Expand Down
1 change: 1 addition & 0 deletions sube/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ pub enum Error {
AccountNotFound,
ConstantNotFound(String),
Platform(String),
CantInitBackend
}

impl fmt::Display for Error {
Expand Down
3 changes: 2 additions & 1 deletion sube/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ impl<R: Rpc> Backend for RpcClient<R> {
log::debug!("Extrinsic: {}", extrinsic);

self.0
.rpc("author_submitExtrinsic", &[&format!("\"{}\"", &extrinsic)])
.rpc::<serde_json::Value>("author_submitExtrinsic", &[&format!("\"{}\"", &extrinsic)])
.await
.map_err(|e| crate::Error::Node(e.to_string()))?;

Ok(())
}

Expand Down

0 comments on commit a599105

Please sign in to comment.