Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
rs-tiled
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Microhacks
rs-tiled
Commits
fc0e0b52
Unverified
Commit
fc0e0b52
authored
3 years ago
by
Alejandro Perea
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix some clippy warnings (#214)
parent
9c7082b9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
src/cache.rs
+1
-1
1 addition, 1 deletion
src/cache.rs
src/loader.rs
+1
-1
1 addition, 1 deletion
src/loader.rs
src/objects.rs
+2
-2
2 additions, 2 deletions
src/objects.rs
with
5 additions
and
4 deletions
CHANGELOG.md
+
1
−
0
View file @
fc0e0b52
...
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
...
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
### Added
-
`TileLayer::width`
&
`TileLayer::height`
for ergonomic access of width/height.
-
`TileLayer::width`
&
`TileLayer::height`
for ergonomic access of width/height.
-
`FiniteTileLayerData::get_tile_data`
,
`InfiniteTileLayerData::get_tile_data`
.
-
`FiniteTileLayerData::get_tile_data`
,
`InfiniteTileLayerData::get_tile_data`
.
-
`Default`
derived implementation for
`Loader`
&
`FilesystemResourceCache`
### Changed
### Changed
-
Update
`zstd`
to
`0.11.0`
.
-
Update
`zstd`
to
`0.11.0`
.
...
...
This diff is collapsed.
Click to expand it.
src/cache.rs
+
1
−
1
View file @
fc0e0b52
...
@@ -50,7 +50,7 @@ pub trait ResourceCache {
...
@@ -50,7 +50,7 @@ pub trait ResourceCache {
}
}
/// A cache that identifies resources by their path in the user's filesystem.
/// A cache that identifies resources by their path in the user's filesystem.
#[derive(Debug)]
#[derive(Debug
,
Default
)]
pub
struct
FilesystemResourceCache
{
pub
struct
FilesystemResourceCache
{
tilesets
:
HashMap
<
ResourcePathBuf
,
Arc
<
Tileset
>>
,
tilesets
:
HashMap
<
ResourcePathBuf
,
Arc
<
Tileset
>>
,
}
}
...
...
This diff is collapsed.
Click to expand it.
src/loader.rs
+
1
−
1
View file @
fc0e0b52
...
@@ -11,7 +11,7 @@ use crate::{Error, FilesystemResourceCache, Map, ResourceCache, Result, Tileset}
...
@@ -11,7 +11,7 @@ use crate::{Error, FilesystemResourceCache, Map, ResourceCache, Result, Tileset}
/// This type is used for loading operations because they require a [`ResourceCache`] for
/// This type is used for loading operations because they require a [`ResourceCache`] for
/// intermediate artifacts, so using a type for creation can ensure that the cache is reused if
/// intermediate artifacts, so using a type for creation can ensure that the cache is reused if
/// loading more than one object is required.
/// loading more than one object is required.
#[derive(Debug,
Clone)]
#[derive(Debug,
Clone
,
Default
)]
pub
struct
Loader
<
Cache
:
ResourceCache
=
FilesystemResourceCache
>
{
pub
struct
Loader
<
Cache
:
ResourceCache
=
FilesystemResourceCache
>
{
cache
:
Cache
,
cache
:
Cache
,
}
}
...
...
This diff is collapsed.
Click to expand it.
src/objects.rs
+
2
−
2
View file @
fc0e0b52
...
@@ -105,8 +105,8 @@ impl ObjectData {
...
@@ -105,8 +105,8 @@ impl ObjectData {
let
height
=
h
.unwrap_or
(
0f32
);
let
height
=
h
.unwrap_or
(
0f32
);
let
rotation
=
r
.unwrap_or
(
0f32
);
let
rotation
=
r
.unwrap_or
(
0f32
);
let
id
=
id
.unwrap_or
(
0u32
);
let
id
=
id
.unwrap_or
(
0u32
);
let
name
=
n
.unwrap_or_
else
(
String
::
new
);
let
name
=
n
.unwrap_or_
default
(
);
let
obj_type
=
t
.unwrap_or_
else
(
String
::
new
);
let
obj_type
=
t
.unwrap_or_
default
(
);
let
mut
shape
=
None
;
let
mut
shape
=
None
;
let
mut
properties
=
HashMap
::
new
();
let
mut
properties
=
HashMap
::
new
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment