Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: trivially_copy_pass_by_ref lint #1654

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions martin-tile-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ impl Format {

/// Get the `format` value as it should be stored in the `MBTiles` metadata table
#[must_use]
pub fn metadata_format_value(&self) -> &'static str {
match *self {
pub fn metadata_format_value(self) -> &'static str {
match self {
Self::Gif => "gif",
Self::Jpeg => "jpeg",
Self::Json => "json",
Expand All @@ -82,8 +82,8 @@ impl Format {
}

#[must_use]
pub fn is_detectable(&self) -> bool {
match *self {
pub fn is_detectable(self) -> bool {
match self {
Self::Png | Self::Jpeg | Self::Gif | Self::Webp => true,
// TODO: Json can be detected, but currently we only detect it
// when it's not compressed, so to avoid a warning, keeping it as false for now.
Expand Down Expand Up @@ -143,8 +143,8 @@ impl Encoding {
}

#[must_use]
pub fn is_encoded(&self) -> bool {
match *self {
pub fn is_encoded(self) -> bool {
match self {
Self::Uncompressed | Self::Internal => false,
Self::Gzip | Self::Zlib | Self::Brotli | Self::Zstd => true,
}
Expand Down
Loading