Skip to content

Commit

Permalink
Ok ok, before push, I will now always run
Browse files Browse the repository at this point in the history
cargo fmt --all -- --check
  • Loading branch information
-karlos- committed Nov 30, 2023
1 parent 568bab2 commit 4b42009
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
18 changes: 18 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@
"group": {
"kind": "build"
}
},
{
"label": "fmt",
"type": "shell",
"command": "cargo fmt --all -- --check",
"problemMatcher": [],
"group": {
"kind": "test"
}
},
{
"type": "cargo",
"command": "test",
"problemMatcher": [
"$rustc"
],
"group": "test",
"label": "rust: cargo test"
}
]
}
4 changes: 2 additions & 2 deletions src/http_assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl AssetReader for HttpAssetReader {
let cache_path = self.cache_path.as_ref().map(|p| p.join(path));
// Load from cache if the asset exists there.
if let Some(cache_path) = &cache_path {
info!("READ: {:?}",path);
info!("READ: {:?}", path);
if cache_path.exists() {
let file = File::open(&cache_path).await?;
return Ok(Box::new(file) as Box<Reader>);
Expand Down Expand Up @@ -78,7 +78,7 @@ impl AssetReader for HttpAssetReader {
if let Some(cache_path) = cache_path {
// Write asset to cache, but ensure only one HttpAssetReader writes at any given point in time
if self.sync.write().unwrap().insert(cache_path.clone()) {
debug!("write: {:?}",path);
debug!("write: {:?}", path);
async_fs::create_dir_all(cache_path.parent().unwrap()).await?;
async_fs::write(cache_path, &bytes).await?;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tilemap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl TileMap {
let oob = offset.length_squared() > radius.length_squared();
if oob {
if let Some(entity) = commands.get_entity(*tile) {
debug!("despawn: {}/{}",x,y);
debug!("despawn: {}/{}", x, y);
entity.despawn_recursive();
}
}
Expand Down

0 comments on commit 4b42009

Please sign in to comment.