mirror of
https://github.com/sotrh/learn-wgpu.git
synced 2024-11-11 19:10:34 +00:00
Fix indentation
In beginner chapter 9 'Model Loading', the `fn format_url(...)` line was unnecessarily indented. This PR also makes some minor reformatting (presumably caused by changes to `rustfmt`).
This commit is contained in:
parent
e514011384
commit
964ad9307b
@ -6,14 +6,15 @@ use wgpu::util::DeviceExt;
|
||||
use crate::{model, texture};
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
fn format_url(file_name: &str) -> reqwest::Url {
|
||||
fn format_url(file_name: &str) -> reqwest::Url {
|
||||
let window = web_sys::window().unwrap();
|
||||
let location = window.location();
|
||||
let base = reqwest::Url::parse(&format!(
|
||||
"{}/{}/",
|
||||
location.origin().unwrap(),
|
||||
option_env!("RES_PATH").unwrap_or("res"),
|
||||
)).unwrap();
|
||||
))
|
||||
.unwrap();
|
||||
base.join(file_name).unwrap()
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ use wgpu::util::DeviceExt;
|
||||
use crate::{model, texture};
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
fn format_url(file_name: &str) -> reqwest::Url {
|
||||
fn format_url(file_name: &str) -> reqwest::Url {
|
||||
let window = web_sys::window().unwrap();
|
||||
let location = window.location();
|
||||
let base = reqwest::Url::parse(&format!(
|
||||
|
@ -6,14 +6,15 @@ use wgpu::util::DeviceExt;
|
||||
use crate::{model, texture};
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
fn format_url(file_name: &str) -> reqwest::Url {
|
||||
fn format_url(file_name: &str) -> reqwest::Url {
|
||||
let window = web_sys::window().unwrap();
|
||||
let location = window.location();
|
||||
let base = reqwest::Url::parse(&format!(
|
||||
"{}/{}/",
|
||||
location.origin().unwrap(),
|
||||
option_env!("RES_PATH").unwrap_or("res"),
|
||||
)).unwrap();
|
||||
))
|
||||
.unwrap();
|
||||
base.join(file_name).unwrap()
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ use wgpu::util::DeviceExt;
|
||||
use crate::{model, texture};
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
fn format_url(file_name: &str) -> reqwest::Url {
|
||||
fn format_url(file_name: &str) -> reqwest::Url {
|
||||
let window = web_sys::window().unwrap();
|
||||
let location = window.location();
|
||||
let base = reqwest::Url::parse(&format!(
|
||||
|
@ -142,7 +142,7 @@ use wgpu::util::DeviceExt;
|
||||
use crate::{model, texture};
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
fn format_url(file_name: &str) -> reqwest::Url {
|
||||
fn format_url(file_name: &str) -> reqwest::Url {
|
||||
let window = web_sys::window().unwrap();
|
||||
let location = window.location();
|
||||
let base = reqwest::Url::parse(&format!(
|
||||
|
Loading…
Reference in New Issue
Block a user