Skip to content

Commit

Permalink
Add Clippy lint allowance and default implementation
Browse files Browse the repository at this point in the history
Added `#![allow(clippy::extra_unused_lifetimes)]` to suppress Clippy warnings in `event_generated.rs`. Implemented `Default` trait for `GeoFenceContract` in `geo_fence_contract.rs` to provide a default constructor.
  • Loading branch information
arkavo-com committed Oct 24, 2024
1 parent f9b7ad4 commit 8c8db9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/bin/contracts/geo_fence_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ pub mod geo_fence_contract {
#[ink(storage)]
pub struct GeoFenceContract {}

impl Default for GeoFenceContract {
fn default() -> Self {
Self::new()
}
}

impl GeoFenceContract {
#[ink(constructor)]
pub fn new() -> Self {
Expand Down
2 changes: 1 addition & 1 deletion src/bin/schemas/event_generated.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// automatically generated by the FlatBuffers compiler, do not modify

#![allow(clippy::extra_unused_lifetimes)]
// @generated

extern crate flatbuffers;
Expand Down

0 comments on commit 8c8db9e

Please sign in to comment.