Skip to content

Commit

Permalink
add a must_use
Browse files Browse the repository at this point in the history
  • Loading branch information
jabuwu committed May 14, 2024
1 parent 794ab11 commit c53ca62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/attachment_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ impl NewFromPtr<spAttachmentLoader> for AttachmentLoader {
impl AttachmentLoader {
/// The spine runtime offers a default [`AttachmentLoader`](`crate::AttachmentLoader`) that
/// loads attachments from an [`Atlas`](`crate::Atlas`).
#[must_use]
pub fn new_atlas_loader(atlas: &Atlas) -> Self {
unsafe {
let atlas_attachment_loader = spAtlasAttachmentLoader_create(atlas.c_ptr());
Expand Down
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
clippy::needless_pass_by_value,
clippy::option_if_let_else,
clippy::redundant_feature_names,
clippy::semicolon_if_nothing_returned
clippy::semicolon_if_nothing_returned,
clippy::must_use_candidate
)]
// https://github.com/rust-lang/rust-clippy/issues/11382
#![allow(clippy::arc_with_non_send_sync)]
Expand Down

0 comments on commit c53ca62

Please sign in to comment.