A few minor lints and docs (#1436)

* A few minor lints and docs

* Added required packages to compile on Debian-style linux
* Inlined some format args, and removed some `&` in args (they cause about 6% slowdown that compiler cannot inline)
* a few spelling mistakes

* fix fmt
This commit is contained in:
Yuri Astrakhan
2023-10-18 23:33:10 -07:00
committed by GitHub
parent 67edac4aca
commit 3d4e3a74e5
51 changed files with 140 additions and 158 deletions
+2 -2
View File
@@ -192,7 +192,7 @@ impl ApplicationIo for WasmApplicationIo {
fn load_resource(&self, url: impl AsRef<str>) -> Result<ResourceFuture, ApplicationError> {
let url = url::Url::parse(url.as_ref()).map_err(|_| ApplicationError::InvalidUrl)?;
log::trace!("Loading resource: {:?}", url);
log::trace!("Loading resource: {url:?}");
match url.scheme() {
#[cfg(feature = "tokio")]
"file" => {
@@ -219,7 +219,7 @@ impl ApplicationIo for WasmApplicationIo {
"graphite" => {
let path = url.path();
let path = path.to_owned();
log::trace!("Loading local resource: {}", path);
log::trace!("Loading local resource: {path}");
let data = self.resources.get(&path).ok_or(ApplicationError::NotFound)?.clone();
Ok(Box::pin(async move { Ok(data.clone()) }) as Pin<Box<dyn Future<Output = Result<Arc<[u8]>, _>>>>)
}